Bug
1820788 [wpt PR 38850] - Use AdjustedFocusedElement when clearing focus from children, a=testonly
Automatic update from web-platform-tests
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/c/chromium/src/+/
4305572
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#
1114311}
--
wpt-commits:
14684f837eba364df3de2b6683d4eb5385333158
wpt-pr: 38850