Merge pull request #17344 from calixteman/issue17342
[Editor] Avoid to add a new ink editor when we aren't editing anymore
This commit is contained in:
commit
4bf7ff2027
@ -152,10 +152,8 @@ class AnnotationEditorLayer {
|
||||
}
|
||||
|
||||
addInkEditorIfNeeded(isCommitting) {
|
||||
if (
|
||||
!isCommitting &&
|
||||
this.#uiManager.getMode() !== AnnotationEditorType.INK
|
||||
) {
|
||||
if (this.#uiManager.getMode() !== AnnotationEditorType.INK) {
|
||||
// We don't want to add an ink editor if we're not in ink mode!
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1604,7 +1604,11 @@ class AnnotationEditorUIManager {
|
||||
if (this.#activeEditor) {
|
||||
// An editor is being edited so just commit it.
|
||||
this.#activeEditor.commitOrRemove();
|
||||
return;
|
||||
if (this.#mode !== AnnotationEditorType.NONE) {
|
||||
// If the mode is NONE, we want to really unselect the editor, hence we
|
||||
// mustn't return here.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.hasSelection) {
|
||||
|
Loading…
Reference in New Issue
Block a user