[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:
Calixte Denizet 2022-07-22 12:13:47 +02:00
parent 6138e16ce2
commit 5bbe0d0782
6 changed files with 127 additions and 31 deletions

View file

@ -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 */