[wpt-sync] Sync PR 38850 - Use AdjustedFocusedElement when clearing focus from children
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38850 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38850
Details from upstream follow.
Mason Freed <masonf@chromium.org> wrote:
Use AdjustedFocusedElement when clearing focus from children
In this case:
\<my-button>
\<template shadowrootmode=open>
\<button>\<slot>\</slot>\</button>
\</template>
Button contents
\</my-button>when the shadow root button is focused, calling
myButton.textContent=''
clears the focus. This is due to a change made
for performance reasons in [1], but I think it's not the right behavior.
The focus should not be cleared in this case, since the adjusted focused
element is still the \<my-button> element.This CL goes back to using AdjustedFocusedElement. This might have
a negative perf impact, but I think it's important to not clear
focus for custom elements in this case.[1] https://chromium.googlesource.com/chromium/src/+/9aab5fab831e4ce17a65d436c214deb650520355
Fixed: 1300584
Change-Id: I3c79dd41c92da9bd35d715bab56e2b8fdef50008
Reviewed-on: https://chromium-review.googlesource.com/4305572
WPT-Export-Revision: 693498772e477075cca4a6c97d4387922dadc5fb
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Comment 5•2 years ago
|
||
bugherder |
Description
•