Merge pull request #20863 from calixteman/fix_intermittent_undo_bar

Only focus the undo bar when the focus isn't inside
This commit is contained in:
Tim van der Meij 2026-03-13 22:03:45 +01:00 committed by GitHub
commit 94b7f8f998
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,7 +105,9 @@ class EditorUndoBar {
// Without the setTimeout, VoiceOver will read out the document title
// instead of the popup label.
this.#focusTimeout = setTimeout(() => {
this.#container.focus();
if (!this.#container.contains(document.activeElement)) {
this.#container.focus();
}
this.#focusTimeout = null;
}, 100);
}