1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

[Editor] Move the keyboard manager at the container level

- This way, the keyboard callbacks are called even if the page has not
the focus, hence the user doesn't have to guess that they have to click
on the page which is a bit painful especially in Ink mode.
- Add two keyboard shortcuts to commit a Freetext editor (ctrl+enter and
escape).
This commit is contained in:
Calixte Denizet 2022-07-19 20:54:17 +02:00
parent 7a4b72ed11
commit e1f28d3504
4 changed files with 83 additions and 105 deletions

View file

@ -734,6 +734,7 @@ class BaseViewer {
});
this.#annotationEditorUIManager = new AnnotationEditorUIManager(
this.container,
this.eventBus
);
if (mode !== AnnotationEditorType.NONE) {