我想在jsTree视图中禁用右箭头键。我已经尝试使用“热键”来禁用它。
$('#folder').jstree({
'hotkeys':{'right':false},
'core':{ 'themes': { "icons": true }}
})
没成功。然后我试了一下
$('#folder').jstree({
'hotkeys':{'right':false},
'core':{ 'themes': { "icons": true }}
}).keydown(function(e){
// right arrow
if ((e.keyCode || e.which) == 39)
{
e.preventDefault()
e.stopImmediatePropagation()
e.stopPropagation()
e.detail.keyboardEvent.preventDefault();
return false;
}
});
这也不起作用。在文档中它说:
To override any of those - just specify your own function, to disable - just set to false.
但我做不到。你能帮我吗?谢谢
(相关的 IT 技术内容需要具体提供)