Skip to content

fix(recorder): use event target selector for setInputFiles on WebKit#40874

Open
csaavedra wants to merge 1 commit into
microsoft:mainfrom
csaavedra:fix-recorder-setinputfiles-webkit
Open

fix(recorder): use event target selector for setInputFiles on WebKit#40874
csaavedra wants to merge 1 commit into
microsoft:mainfrom
csaavedra:fix-recorder-setinputfiles-webkit

Conversation

@csaavedra
Copy link
Copy Markdown

On WebKit, deepActiveElement() cannot traverse into the file input's closed user-agent shadow root, so _activeModel is always 'body' when onInput fires for a file input. Generate the selector directly from the event target instead, bypassing _activeModel.

Also add 'file' to _shouldIgnoreMouseEvent alongside 'date' and 'range' so the click that opens the file picker is never recorded, consistent with how the other non-text input types are handled and removing the reliance on the server-side merge introduced in #40861.

On WebKit, deepActiveElement() cannot traverse into the file input's
closed user-agent shadow root, so _activeModel is always 'body' when
onInput fires for a file input. Generate the selector directly from the
event target instead, bypassing _activeModel.

Also add 'file' to _shouldIgnoreMouseEvent alongside 'date' and 'range'
so the click that opens the file picker is never recorded, consistent
with how the other non-text input types are handled and removing the
reliance on the server-side merge introduced in microsoft#40861.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant