Skip to content

Commit

Permalink
Set userTriggered to false on Input attribute modifications (#1159)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
eoghanmurray authored Mar 3, 2023
1 parent 8e47ca1 commit 5e6c132
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/young-timers-grow.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion packages/rrweb/src/record/observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5e6c132

Please sign in to comment.