Permalink
Browse files

[panel demo] Prevent editor from losing focus when closing a panel

  • Loading branch information...
marijnh committed Dec 21, 2018
1 parent f658d09 commit 0612ed0d40ac8b893c4f8cec98958129f2f86969
Showing with 2 additions and 1 deletion.
  1. +2 −1 demo/panel.html
@@ -106,7 +106,8 @@ <h2>Panel Demo</h2>
close.setAttribute("title", "Remove me!");
close.setAttribute("class", "remove-panel");
close.textContent = "";
CodeMirror.on(close, "click", function() {
CodeMirror.on(close, "mousedown", function(e) {
e.preventDefault()
panels[node.id].clear();
});
label = node.appendChild(document.createElement("span"));

0 comments on commit 0612ed0

Please sign in to comment.