mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-08-03 04:47:21 +02:00
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:
commit
94b7f8f998
@ -105,7 +105,9 @@ class EditorUndoBar {
|
|||||||
// Without the setTimeout, VoiceOver will read out the document title
|
// Without the setTimeout, VoiceOver will read out the document title
|
||||||
// instead of the popup label.
|
// instead of the popup label.
|
||||||
this.#focusTimeout = setTimeout(() => {
|
this.#focusTimeout = setTimeout(() => {
|
||||||
|
if (!this.#container.contains(document.activeElement)) {
|
||||||
this.#container.focus();
|
this.#container.focus();
|
||||||
|
}
|
||||||
this.#focusTimeout = null;
|
this.#focusTimeout = null;
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user