From d29b40991a6ea732b0ca4d42a8a62d186889b6ef Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 17 Mar 2018 08:58:55 -0400 Subject: [PATCH] remove use of innerHTML to please Firefox validator (see https://github.com/codemirror/CodeMirror/pull/5313) --- src/lib/codemirror/addon/merge/merge.css | 6 ++++++ src/lib/codemirror/addon/merge/merge.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/codemirror/addon/merge/merge.css b/src/lib/codemirror/addon/merge/merge.css index bda3d9f80..dadd7f59c 100644 --- a/src/lib/codemirror/addon/merge/merge.css +++ b/src/lib/codemirror/addon/merge/merge.css @@ -48,6 +48,12 @@ color: #555; line-height: 1; } +.CodeMirror-merge-scrolllock:after { + content: "\21db\00a0\00a0\21da"; +} +.CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after { + content: "\21db\21da"; +} .CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right { position: absolute; diff --git a/src/lib/codemirror/addon/merge/merge.js b/src/lib/codemirror/addon/merge/merge.js index dc2e77c60..3a77f7a64 100644 --- a/src/lib/codemirror/addon/merge/merge.js +++ b/src/lib/codemirror/addon/merge/merge.js @@ -211,7 +211,7 @@ function setScrollLock(dv, val, action) { dv.lockScroll = val; if (val && action != false) syncScroll(dv, DIFF_INSERT) && makeConnections(dv); - dv.lockButton.innerHTML = val ? "\u21db\u21da" : "\u21db  \u21da"; + (val ? CodeMirror.addClass : CodeMirror.rmClass)(dv.lockButton, "CodeMirror-merge-scrolllock-enabled"); } // Updating the marks for editor content