Skip to content
Snippets Groups Projects
Commit d44ced70 authored by Alex Cotiugă's avatar Alex Cotiugă
Browse files

XWIKI-19204: Annotation JS code is failing when the More Actions menu is disabled

* register the annotations handler only when the annotations trigger is available
parent 55471a7d
No related branches found
No related tags found
No related merge requests found
...@@ -727,7 +727,9 @@ ...@@ -727,7 +727,9 @@
hookMenuButton : function() { hookMenuButton : function() {
// Since 7.4M1, the annotations trigger is inserted via an UIX. // Since 7.4M1, the annotations trigger is inserted via an UIX.
var annotationsTrigger = $('tmAnnotationsTrigger'); var annotationsTrigger = $('tmAnnotationsTrigger');
annotationsTrigger.observe('click', this.toggleSettingsPanel.bind(this)); if (annotationsTrigger) {
annotationsTrigger.observe('click', this.toggleSettingsPanel.bind(this));
}
}, },
setAnnotationVisibility : function (visibility) { setAnnotationVisibility : function (visibility) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment