We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a692f86 + cb9c855 commit f54cfe0Copy full SHA for f54cfe0
web/toolbar.js
@@ -121,12 +121,17 @@ class Toolbar {
121
this.#bindListeners(options);
122
123
if (options.editorHighlightColorPicker) {
124
- this.eventBus._on("annotationeditoruimanager", ({ uiManager }) => {
125
- this.#setAnnotationEditorUIManager(
126
- uiManager,
127
- options.editorHighlightColorPicker
128
- );
129
- });
+ this.eventBus._on(
+ "annotationeditoruimanager",
+ ({ uiManager }) => {
+ this.#setAnnotationEditorUIManager(
+ uiManager,
+ options.editorHighlightColorPicker
130
+ );
131
+ },
132
+ // Once the color picker has been added, we don't want to add it again.
133
+ { once: true }
134
135
}
136
137
this.reset();
0 commit comments