使用键盘导航时防止默认的jquery-ui选项卡行为 [英] Prevent default jquery-ui tab behaviour when using keyboard navigation
本文介绍了使用键盘导航时防止默认的jquery-ui选项卡行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用jquery-ui选项卡,并且可以通过jeditable内联编辑选项卡标题.但是,使用可编辑文本中的光标进行导航会导致jquery-ui导航到其旁边的选项卡.
I'm using jquery-ui tabs and jeditable to inline edit the tab title. But navigating with the cursors in the editable text leads jquery-ui to navigate to the tab next to it.
如何防止jquery的默认行为(在选项卡中禁用键盘导航).
How can i prevent the jquery default behaviour (disable keyboad navigation in tabs).
干杯, 布龙科
推荐答案
通过以下方式解决它:
$.widget( "ui.tabs", $.ui.tabs, {
options: {
keyboard: true
},
_tabKeydown: function(e) {
if(this.options.keyboard) {
this._super( '_tabKeydown' );
} else {
return false;
}
}
});
这篇关于使用键盘导航时防止默认的jquery-ui选项卡行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文