Summary: | setSelectionRange will reset the m_latestFocusTrigger variable, causing the subsequently focused element to match the :focus-visible selector | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | 2471314 | ||||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ews-watchlist, mifenton, rniwa, simon.fraser, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari 16 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Created attachment 466389 [details]
Like Element::focusForBindings, set the trigger to FocusTrigger::Bindings
Comment on attachment 466389 [details]
Like Element::focusForBindings, set the trigger to FocusTrigger::Bindings
Thanks for the patch but this patch lacks appropriate commit message & a test, both of which need to be added in order for this code change to land.
Pull request: https://github.com/WebKit/WebKit/pull/15092 Committed 270043@main (3d85c92f718f): <https://commits.webkit.org/270043@main> Reviewed commits have been landed. Closing PR #15092 and removing active labels. |
Created attachment 466388 [details] test case element.setSelectionRange() is used to modify the cursor position, if the element.focus() is called again subsequently, the focused element will incorrectly match the :focus-visible selector.