diff options
Diffstat (limited to 'public/vendor/codemirror/addon/display')
-rw-r--r-- | public/vendor/codemirror/addon/display/placeholder.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/public/vendor/codemirror/addon/display/placeholder.js b/public/vendor/codemirror/addon/display/placeholder.js index babddfb1..2f8b1f84 100644 --- a/public/vendor/codemirror/addon/display/placeholder.js +++ b/public/vendor/codemirror/addon/display/placeholder.js @@ -14,10 +14,12 @@ if (val && !prev) { cm.on("blur", onBlur); cm.on("change", onChange); + cm.on("swapDoc", onChange); onChange(cm); } else if (!val && prev) { cm.off("blur", onBlur); cm.off("change", onChange); + cm.off("swapDoc", onChange); clearPlaceholder(cm); var wrapper = cm.getWrapperElement(); wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); |