Here is my plain config:
$("#tree").tree({
ui : {
animation: 100,
theme_name : "mytheme"
},
types : {
"default" : {
clickable : true,
renameable : false,
deletable : false,
creatable : false,
draggable : false
}
},
callback : {
onchange : function (NODE) {
...<some code>...
}
},
plugins : {
hotkeys : {
}
}
});
http://forum.jquery.com/topic/problem-with-bind-keydown-in-jquery-1-4-2
Think it's a Jquery problem in conjunction with the 'jquery.hotkeys'
plugin, not the 'jquery.tree.hotkeys' one.
Maybe have to wait for 1.4.3 ???
there IS a problem with jqery.hotkeys and the new special events
system of JQuery 1.4.2. There is a solution: John Resig has rewriten
the jquery.hotkeys code, see http://github.com/jeresig/jquery.hotkeys/blob/master/jquery.hotkeys.js
Of course this doesn't work out of the box with jstree, because the
old functionality is only partially implemented. So I've changed the
jquery.tree.hotkey pluging:
Line 67:
OLD $(document).bind("keydown", { combi : k, disableInInput: true },
function (event) {
NEW $(document).bind("keydown", k, function (event) {
With this fix I get a working key handling in jsTree with JQurey
1.4.2.
BUT you loose the special options 'disableInInput' (it's not
implemented any more). I have no idea if it's necessary any more!
Maybe anyone with deeper knowledge should have a look what's going
on ;-)
CU
OLD if(typeof window.hotkeys == "undefined") throw "jsTree hotkeys:
jQuery hotkeys plugin not included.";
NEW if(typeof jQuery.hotkeys == "undefined") throw "jsTree hotkeys:
jQuery hotkeys plugin not included.";
On Feb 23, 10:23 am, stoffel <sskop...@web.de> wrote:
> Ok,
>
> there IS a problem with jqery.hotkeys and the new special events
> system of JQuery 1.4.2. There is a solution: John Resig has rewriten
> the jquery.hotkeys code, seehttp://github.com/jeresig/jquery.hotkeys/blob/master/jquery.hotkeys.js