mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
[Editor] Avoid to scroll when an annotation is commited (fixes issue #15744)
This commit is contained in:
parent
1ab711e2ac
commit
a84d14b382
2 changed files with 8 additions and 10 deletions
|
@ -517,11 +517,9 @@ class InkEditor extends AnnotationEditor {
|
|||
// When commiting, the position of this editor is changed, hence we must
|
||||
// move it to the right position in the DOM.
|
||||
this.parent.moveEditorInDOM(this);
|
||||
if (this.pageIndex === this._uiManager.currentPageIndex) {
|
||||
// After the div has been moved in the DOM, the focus may have been stolen
|
||||
// by document.body, hence we just keep it here.
|
||||
this.div.focus();
|
||||
}
|
||||
this.div.focus({
|
||||
preventScroll: true /* See issue #15744 */,
|
||||
});
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue