mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 00:28:06 +02:00
[Editor] Blur unselected editors
When an editor is selected in using the keyboard then it has the focus. But then if the editor is unselected with Escape key then the focus must be removed otherwise we still have a blue outline around it. And add few missing timeout in the integration tests.
This commit is contained in:
parent
611acf52c4
commit
59bcfd9b9e
2 changed files with 31 additions and 1 deletions
|
@ -972,6 +972,11 @@ class AnnotationEditor {
|
|||
unselect() {
|
||||
this.#resizersDiv?.classList.add("hidden");
|
||||
this.div?.classList.remove("selectedEditor");
|
||||
if (this.div?.contains(document.activeElement)) {
|
||||
// Don't use this.div.blur() because we don't know where the focus will
|
||||
// go.
|
||||
this.parent.div.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue