[wpt-sync] Sync PR 51524 - [Selection] delegated target text control are mouse event handled
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 51524 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/51524
Details from upstream follow.
Di Zhang <dizhangg@chromium.org> wrote:
[Selection] delegated target text control are mouse event handled
We add the feature DelegatesFocusTextControlFix,
which fixes this case: when the mouse target element is a shadow host
with delegatesFocus, but its focusable area is a text control element.Currently, this text control element will be marked as focused and not
handled. The selection will be set on where the click happened.
That is wrong because, in this case, focus and selection should both be
on the text control.
We fix this by updating the logic in MouseEventManager::HandleMouseFocus
- If focusable area is already focused, no need to re-focus and return
not handled so selection can be set where click happened.- Else, if focusable area is a text control, focus it and return
handled so selection stays on it.- Else, focus it and return not handled so selection can be set where
click happened.Change-Id: I553aec3d49c6984194ae8eefe2ac95673429d8c7
Bug: 400317114
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6324829
Reviewed-by: Mason Freed \<masonf@chromium.org>
Commit-Queue: Di Zhang \<dizhangg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1436159}
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Comment 1•1 month ago
|
||
Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 1 subtests
Status Summary
Firefox
OK
: 1
PASS
: 1
Chrome
OK
: 1
FAIL
: 1
Safari
OK
: 1
FAIL
: 1
Links
Comment 4•1 month ago
|
||
bugherder |
Description
•