1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

[Editor] Make sure that all layers are disabled when an editing session is done

Fixes issue #17368.
This commit is contained in:
Calixte Denizet 2023-12-04 13:27:30 +01:00
parent 5111b6d371
commit 43eea0b38e
2 changed files with 68 additions and 0 deletions

View file

@ -146,6 +146,11 @@ class AnnotationEditorLayer {
updateMode(mode = this.#uiManager.getMode()) {
this.#cleanup();
switch (mode) {
case AnnotationEditorType.NONE:
this.disableTextSelection();
this.togglePointerEvents(false);
this.disableClick();
break;
case AnnotationEditorType.INK:
// We always want to have an ink editor ready to draw in.
this.addInkEditorIfNeeded(false);