From 47ec9590327f834768bb73ba8d02c2947f6e8fcc Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 5 Sep 2017 18:35:11 +0200 Subject: [PATCH] make sure contenteditable is not set in read only mode --- www/pad/inner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/pad/inner.js b/www/pad/inner.js index 8cd2b9beb..9be24e78a 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -369,6 +369,8 @@ define([ if (!readOnly && !initializing) { userDocStateDom.setAttribute("contenteditable", "true"); // lol wtf + } else if (readOnly) { + userDocStateDom.removeAttribute("contenteditable"); } var patch = (DD).diff(inner, userDocStateDom); (DD).apply(inner, patch);