Skip to content

Commit

Permalink
even prevented mousedowns will trigger blur when renaming - close vak…
Browse files Browse the repository at this point in the history
  • Loading branch information
vakata committed Sep 22, 2015
1 parent dfb01b8 commit 4e33345
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions dist/jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -4343,6 +4343,7 @@
if(callback) {
callback.call(this, tmp, nv, cancel);
}
h2 = null;
}, this),
"keydown" : function (e) {
var key = e.which;
Expand Down Expand Up @@ -4381,6 +4382,11 @@
a.replaceWith(s);
h1.css(fn);
h2.css(fn).width(Math.min(h1.text("pW" + h2[0].value).width(),w))[0].select();
$(document).one('mousedown.jstree touchstart.jstree dnd_start.vakata', function (e) {
if (h2 && e.target !== h2) {
$(h2).blur();
}
});
},


Expand Down
Loading

0 comments on commit 4e33345

Please sign in to comment.