Skip to content

Commit

Permalink
Set the readonly attribute on the hidden textarea when the editor is …
Browse files Browse the repository at this point in the history
…read-only

This prevents cut/paste from showing up in the context menu on Chrome
(but doesn't help on Firefox).

Closes #6418
  • Loading branch information
marijnh committed Sep 20, 2020
1 parent 376c0d9 commit 66a96a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/input/TextareaInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export default class TextareaInput {
readOnlyChanged(val) {
if (!val) this.reset()
this.textarea.disabled = val == "nocursor"
this.textarea.readOnly = !!val
}

setUneditable() {}
Expand Down

0 comments on commit 66a96a5

Please sign in to comment.