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:
parent
a3637e653f
commit
11610a9e66
2 changed files with 42 additions and 4 deletions
|
@ -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 */,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue