You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
newEditorView({doc: `hello world `,extensions: [],parent: document.getElementById('editor-root'),});document.querySelector('button').onfocus=()=>document.querySelector('input').focus();
Repro recording
repro.mp4
Repro step
Click inside the text editor to set focus
Click "transfer focus" button
Observe blinking cursor in text input
Type anything
Expect: text input to receive all keyboard events
Actual: editor receives all keyboard events
Set EditorView.EDIT_CONTEXT = false;
Repeat steps, observe that issue goes away
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.
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.
Describe the issue
Minimum repro: https://stackblitz.com/edit/vitejs-vite-y35czl?file=main.js
Repro recording
repro.mp4
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
The text was updated successfully, but these errors were encountered: