codemirror
Advanced tools
Comparing version 5.58.0 to 5.58.1
@@ -18,3 +18,3 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
cm.on("swapDoc", onChange); | ||
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = () => onComposition(cm)) | ||
CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) }) | ||
onChange(cm); | ||
@@ -53,9 +53,11 @@ } else if (!val && prev) { | ||
function onComposition(cm) { | ||
var empty = true, input = cm.getInputField() | ||
if (input.nodeName == "TEXTAREA") | ||
empty = !input.value | ||
else if (cm.lineCount() == 1) | ||
empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent) | ||
if (empty) clearPlaceholder(cm) | ||
else setPlaceholder(cm) | ||
setTimeout(function() { | ||
var empty = false, input = cm.getInputField() | ||
if (input.nodeName == "TEXTAREA") | ||
empty = !input.value | ||
else if (cm.lineCount() == 1) | ||
empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent) | ||
if (empty) setPlaceholder(cm) | ||
else clearPlaceholder(cm) | ||
}, 20) | ||
} | ||
@@ -62,0 +64,0 @@ |
{ | ||
"name": "codemirror", | ||
"version": "5.58.0", | ||
"version": "5.58.1", | ||
"main": "lib/codemirror.js", | ||
@@ -5,0 +5,0 @@ "style": "lib/codemirror.css", |
@@ -69,2 +69,2 @@ // EDITOR CONSTRUCTOR | ||
CodeMirror.version = "5.58.0" | ||
CodeMirror.version = "5.58.1" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2880376
65008