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

[Editor] Always give the focus to the ink editor when starting drawing (bug 1867588)

This way, when the editor is blurred, it can be committed and everything works fine.
It fixes issue #17373.
This commit is contained in:
Calixte Denizet 2023-12-04 23:13:31 +01:00
parent a3637e653f
commit 11610a9e66
2 changed files with 42 additions and 4 deletions

View file

@ -660,10 +660,7 @@ class InkEditor extends AnnotationEditor {
event.preventDefault();
if (
event.pointerType !== "mouse" &&
!this.div.contains(document.activeElement)
) {
if (!this.div.contains(document.activeElement)) {
this.div.focus({
preventScroll: true /* See issue #17327 */,
});