Open chuanqisun opened 3 weeks ago
That appears to be another bug in Chrome's implementation of EditContext
. I've reported it as issue 375711382. Until they fix it, the only advice I can offer is to set up your event handlers to avoid triggering this.
Thank you for distilling the repro and reporting to Chrome.
Describe the issue
Minimum repro: https://stackblitz.com/edit/vitejs-vite-y35czl?file=main.js
Repro recording
https://github.com/user-attachments/assets/2f638e98-9c0b-4450-99e4-aa577f89ffe2
Repro step
Expect: text input to receive all keyboard events Actual: editor receives all keyboard events
Additional context
I need to move focus from one element to another as part of an accessibility focus trap implementation. In the real code, the element that transfers focus are dummy elements at the beginning and end of the focus trapped area.
Browser and platform
Chrome in Linux, Windows, and MacOS
Reproduction link
https://stackblitz.com/edit/vitejs-vite-y35czl?file=main.js