mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[Editor] Move an the editor div in the DOM once a translation with the keyboard is done
When moving an element in the DOM, the focus is potentially lost, so we need to make sure that the focused element before the translation will get back its focus after it. But we must take care to not execute any focus/blur callbacks because the user didn't do anything which should trigger such events: it's a detail of implementation. For example, when several editors are selected and moved, then at the end the same must be selected, so no element receive a focus event which will set it as selected.
This commit is contained in:
parent
ec2b717705
commit
7d8b53bf7a
6 changed files with 134 additions and 13 deletions
|
@ -634,6 +634,9 @@ class InkEditor extends AnnotationEditor {
|
|||
|
||||
/** @inheritdoc */
|
||||
focusin(event) {
|
||||
if (!this._focusEventsAllowed) {
|
||||
return;
|
||||
}
|
||||
super.focusin(event);
|
||||
this.enableEditMode();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue