Status Update
Comments
va...@google.com <va...@google.com> #2
Tried to reproduce the issue on chrome version #130.0.6723.70 using Win 11 as per comment#1
Steps to reproduce:
---------------------------
1. Launched chrome browser
2. Opened given html file: test.html
3. Click on the editable context area and then click on button.
4. Observed the focus shifting to try to type text area.
5. While trying to type anything the text is coming on editable text area instead of focused area.
6. In firefox, Typed text is appearing on focused area instead of editable text area.
Reporter@ Could you please review the attached screencast and let us know if anything being missed here and please confirm if point:5 is the issue you are pointing to?and confirm firefox behaviour is expected ?
Note: Requesting you to copy the entire content of chrome://version details and please copy paste the info in .txt file format.
.
Thanks..!!
Steps to reproduce:
---------------------------
1. Launched chrome browser
2. Opened given html file: test.html
3. Click on the editable context area and then click on button.
4. Observed the focus shifting to try to type text area.
5. While trying to type anything the text is coming on editable text area instead of focused area.
6. In firefox, Typed text is appearing on focused area instead of editable text area.
Reporter@ Could you please review the attached screencast and let us know if anything being missed here and please confirm if point:5 is the issue you are pointing to?and confirm firefox behaviour is expected ?
Note: Requesting you to copy the entire content of chrome://version details and please copy paste the info in .txt file format.
.
Thanks..!!
ma...@gmail.com <ma...@gmail.com> #3
Yes, you followed the instructions as intended and point 5 is indeed the unexpected behavior. The expected behavior is for text input to go to the focused element.
pe...@google.com <pe...@google.com> #4
Thank you for providing more feedback. Adding the requester to the CC list.
go...@google.com <go...@google.com> #5
Able to reproduce the issue on reported chrome version #129.0.6668.100 using Windows 10, Mac 14.7 & Linux Debian as per comment#1 & comment#3 ,
Reproducible on
==============
132.0.6804.0 - Canary
132.0.6793.2 - Dev
131.0.6778.13 - Beta
130.0.6723.70 - Stable
[Forward Bisect ] Information:
---------------------------------------
Good Build: 121.0.6118.0
Bad Build: 121.0.6119.0
Bisect Script: python3 bisect_builds.py -o -a mac -g 121.0.6118.0 -b 121.0.6119.0
Change log:https://chromium.googlesource.com/chromium/src/+log/c99a7674955d3a118d6d929e53ee22d278b4d7cf..a47af0e3c56326a452b03fb588ac5ce09d484004
Change-Id: Icbc8bd6e3d221f82d0aee521493802e983d6be55
Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/5004542
daniec@: Please help us in re-assigning if this is not related to your change.
Thanks..!!
Reproducible on
==============
132.0.6804.0 - Canary
132.0.6793.2 - Dev
131.0.6778.13 - Beta
130.0.6723.70 - Stable
[Forward Bisect ] Information:
---------------------------------------
Good Build: 121.0.6118.0
Bad Build: 121.0.6119.0
Bisect Script: python3 bisect_builds.py -o -a mac -g 121.0.6118.0 -b 121.0.6119.0
Change log:
Change-Id: Icbc8bd6e3d221f82d0aee521493802e983d6be55
Reviewed-on:
daniec@: Please help us in re-assigning if this is not related to your change.
Thanks..!!
zh...@bytedance.com <zh...@bytedance.com> #6
I have identified the root cause and I am committed to resolving it.
ap...@google.com <ap...@google.com> #7
Project: chromium/src
Branch: main
Author: zhoupeng <
Link:
[EditContext] Deactivate EditContext earlier to prevent being impacted by DispatchFocusEvent
Expand for full commit details
[EditContext] Deactivate EditContext earlier to prevent being impacted by DispatchFocusEvent
EditContext's activation is synced with the associated element being
focused or not. If an element loses focus, its associated EditContext
is deactivated.
Before this patch, deactivate the EditContext associated with
`old_focused_element` after `DispatchFocusEvent`. However,
`DispatchFocusEvent` could potentially result in another change in
focus, which would prevent the EditContext's from being deactivated.
Bug: 375711382
Change-Id: I4fb422602faeae5145b3431aee063d367b69fbd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332446
Reviewed-by: Dan Clark <daniec@microsoft.com>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Peng Zhou <zhoupeng.1996@bytedance.com>
Cr-Commit-Position: refs/heads/main@{#1429887}
Files:
- M
third_party/blink/renderer/core/dom/document.cc
- A
third_party/blink/web_tests/external/wpt/editing/edit-context/edit-context-focus.tentative.html
Hash: 05b7a8695eac08a7196d2969e8d57879c369e290
Date: Sat Mar 08 02:36:43 2025
Description
Steps to reproduce the problem
Problem Description
Instead of going to the newly focused element, typed text is still being sent to the originally focused element with the edit context, despite keyboard focus no longer being on that element.
Additional Comments
Attached HTML document can be used to reproduce the issue.
This happens in Chrome on Linux, macOS, and Windows.
Summary
Moving focus away from a focused edit context in a third element's focus handler breaks text input
Additional Data
Category: API
Chrome Channel: Stable
Regression: N/A