Skip to content
Snippets Groups Projects
Commit fc51cfd2 authored by Yannis Barlas's avatar Yannis Barlas
Browse files

fix: notes are only disabled in read-only mode

parent 94f9cd2e
No related branches found
No related tags found
No related merge requests found
import { isUndefined } from 'lodash'
import { AnnotationTool } from 'substance' import { AnnotationTool } from 'substance'
class NoteTool extends AnnotationTool { class NoteTool extends AnnotationTool {
...@@ -6,7 +5,7 @@ class NoteTool extends AnnotationTool { ...@@ -6,7 +5,7 @@ class NoteTool extends AnnotationTool {
const el = super.renderButton($$) const el = super.renderButton($$)
const readOnly = this.isSurfaceReadOnly() const readOnly = this.isSurfaceReadOnly()
if (!isUndefined(readOnly)) el.attr('disabled', 'true') if (readOnly === true) el.attr('disabled', 'true')
return el return el
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment