mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 00:28:06 +02:00
Merge pull request #16762 from calixteman/editor_focus
[Editor] When an editor is unselected give the focus to the current page
This commit is contained in:
commit
0b715e2a73
4 changed files with 90 additions and 3 deletions
|
@ -975,7 +975,7 @@ class AnnotationEditor {
|
|||
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();
|
||||
this._uiManager.currentLayer.div.focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -837,7 +837,7 @@ class AnnotationEditorUIManager {
|
|||
}
|
||||
|
||||
this.unselectAll();
|
||||
const layer = this.#allLayers.get(this.#currentPageIndex);
|
||||
const layer = this.currentLayer;
|
||||
|
||||
try {
|
||||
const newEditors = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue