Skip to content

Commit

Permalink
Merge pull request mozilla#17364 from calixteman/editor_disable_highl…
Browse files Browse the repository at this point in the history
…ight

[Editor] Disable mouse events when leaving the highlight mode
  • Loading branch information
calixteman authored Dec 1, 2023
2 parents a1d84f5 + 83d0b6c commit 6b3ae44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/display/editor/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ class HighlightEditor extends AnnotationEditor {
});
}

/** @inheritdoc */
disableEditing() {
super.disableEditing();
this.div.classList.toggle("disabled", true);
}

/** @inheritdoc */
enableEditing() {
super.enableEditing();
this.div.classList.toggle("disabled", false);
}

/** @inheritdoc */
fixAndSetPosition() {
return super.fixAndSetPosition(0);
Expand Down
4 changes: 4 additions & 0 deletions web/annotation_editor_layer_builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,10 @@
pointer-events: auto;
}

&.disabled .internal {
pointer-events: none;
}

&.selectedEditor {
.internal {
cursor: pointer;
Expand Down

0 comments on commit 6b3ae44

Please sign in to comment.