From 66a96a567b7b1e3da6319bd933c94b284811f161 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Sun, 20 Sep 2020 19:37:00 +0200 Subject: [PATCH] Set the readonly attribute on the hidden textarea when the editor is read-only This prevents cut/paste from showing up in the context menu on Chrome (but doesn't help on Firefox). Closes #6418 --- src/input/TextareaInput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/input/TextareaInput.js b/src/input/TextareaInput.js index 8fe14bb413..977eb22723 100644 --- a/src/input/TextareaInput.js +++ b/src/input/TextareaInput.js @@ -366,6 +366,7 @@ export default class TextareaInput { readOnlyChanged(val) { if (!val) this.reset() this.textarea.disabled = val == "nocursor" + this.textarea.readOnly = !!val } setUneditable() {}