mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
[Editor] When in non-editing mode, add a new editor only once the editing mode has switched
Switching to an editing mode can be asynchronous (e.g. if an editable annotation exists on a visible page), so we must add a new editor only when the page rendering is done.
This commit is contained in:
parent
f9e3b6bcc4
commit
6dd75c0e62
5 changed files with 68 additions and 10 deletions
|
@ -2311,11 +2311,11 @@ class PDFViewer {
|
|||
const updater = () => {
|
||||
this.#cleanupSwitchAnnotationEditorMode();
|
||||
this.#annotationEditorMode = mode;
|
||||
this.#annotationEditorUIManager.updateMode(mode, editId, isFromKeyboard);
|
||||
eventBus.dispatch("annotationeditormodechanged", {
|
||||
source: this,
|
||||
mode,
|
||||
});
|
||||
this.#annotationEditorUIManager.updateMode(mode, editId, isFromKeyboard);
|
||||
};
|
||||
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue