From e4f8b7c022ec2d2a9fef5bbd12831fb13a18dd03 Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] Set userTriggered to false on Input attribute modifications (#1159) * Set userTriggered to false on Input attribute modifications - the fact we are intercepting them via hook rather than an event suggests to me that they could well be programmatic * Create young-timers-grow.md --- .changeset/young-timers-grow.md | 5 +++++ packages/rrweb/src/record/observer.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/young-timers-grow.md diff --git a/.changeset/young-timers-grow.md b/.changeset/young-timers-grow.md new file mode 100644 index 00000000..e2f9b6b7 --- /dev/null +++ b/.changeset/young-timers-grow.md @@ -0,0 +1,5 @@ +--- +"rrweb": bugfix +--- + +For users of userTriggeredOnInput setting: also set userTriggered to false on Input attribute modifications; this was previously empty this variant of IncrementalSource.Input diff --git a/packages/rrweb/src/record/observer.ts b/packages/rrweb/src/record/observer.ts index 76a78c6f..23600784 100644 --- a/packages/rrweb/src/record/observer.ts +++ b/packages/rrweb/src/record/observer.ts @@ -453,7 +453,10 @@ function initInputObserver({ { set() { // mock to a normal event - eventHandler({ target: this as EventTarget } as Event); + eventHandler({ + target: this as EventTarget, + isTrusted: false, // userTriggered to false as this could well be programmatic + } as Event); }, }, false,