mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
[Editor] Dispatch an event when some global states are changing
- this way the context menu in Firefox can take into account what we have in the clipboard, if an editor is selected, ... - when the user will click on a context menu item, an action will be triggered, hence this patch adds what is required to handle it; - some tests will be added in the Firefox' patch.
This commit is contained in:
parent
a1ac1a61b7
commit
ec0f9f6dcf
8 changed files with 278 additions and 28 deletions
|
@ -640,6 +640,10 @@ class BaseViewer {
|
|||
if (this._scriptingManager) {
|
||||
this._scriptingManager.setDocument(null);
|
||||
}
|
||||
if (this.#annotationEditorUIManager) {
|
||||
this.#annotationEditorUIManager.destroy();
|
||||
this.#annotationEditorUIManager = null;
|
||||
}
|
||||
}
|
||||
|
||||
this.pdfDocument = pdfDocument;
|
||||
|
@ -899,7 +903,6 @@ class BaseViewer {
|
|||
}
|
||||
|
||||
_resetView() {
|
||||
this.#annotationEditorUIManager = null;
|
||||
this._pages = [];
|
||||
this._currentPageNumber = 1;
|
||||
this._currentScale = UNKNOWN_SCALE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue