Skip to content
Snippets Groups Projects
Commit 612b3d2c authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[show-hint addon] Re-focus editor when pop-up is clicked

Closes #1264
parent 3f9139c9
No related branches found
No related tags found
No related merge requests found
......@@ -113,11 +113,12 @@ CodeMirror.showHint = function(cm, getHints, options) {
CodeMirror.on(hints, "dblclick", function(e) {
var t = e.target || e.srcElement;
if (t.hintId != null) {selectedHint = t.hintId; pick();}
setTimeout(function(){cm.focus();}, 20);
});
CodeMirror.on(hints, "click", function(e) {
var t = e.target || e.srcElement;
if (t.hintId != null) changeActive(t.hintId);
});
CodeMirror.on(hints, "mousedown", function(e) {
setTimeout(function(){cm.focus();}, 20);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment