mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
[Editor] Unselect correctly removed editors
- After undoing a deletion of several editors, they appeared to be selected (they had a red border) when in fact they were not, consequently, this patch aims to remove the selectedEditor class when an editor is removed; - Add a test with some ink editors.
This commit is contained in:
parent
6138e16ce2
commit
5bbe0d0782
6 changed files with 127 additions and 31 deletions
|
@ -416,6 +416,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.moveDivInDOM(this);
|
||||
// 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();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue