From 16ef1d84cdb970e9e1b1d551800a6e0d68894ae0 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Wed, 28 Jun 2023 10:54:27 +0200 Subject: [PATCH] Change arrow-function to function call for HTA (#7552) --- plugins/tiddlywiki/codemirror/engine.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/tiddlywiki/codemirror/engine.js b/plugins/tiddlywiki/codemirror/engine.js index e775e1c95..d994344fc 100755 --- a/plugins/tiddlywiki/codemirror/engine.js +++ b/plugins/tiddlywiki/codemirror/engine.js @@ -161,7 +161,7 @@ function CodeMirrorEngine(options) { if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { cm.state.draggingText(event); // Ensure the editor is re-focused - setTimeout(() => cm.display.input.focus(), 20); + setTimeout(function() {cm.display.input.focus();}, 20); return; } try { @@ -173,13 +173,13 @@ function CodeMirrorEngine(options) { } cm.setCursor(cm.coordsChar({left:event.pageX,top:event.pageY})); if (selected) { - for (var i = 0; i < selected.length; ++i) { + for (var i = 0; i < selected.length; ++i) { replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); } } cm.replaceSelection(text, "around", "paste"); cm.display.input.focus(); - } + } } catch(e){} }