I create combobox and insert QuickTips by inserting ‘qtip’ attribute to template(like in this question).
All works fine except QuickTips does not shown on traversing combobox list by keyboard.
Does anybody know how enable QuickTips when traversing combo list by keyboard?
I’m use extjs-3.4.0
Thanks.
My combo is:
Ext.extend(Ext.form.ComboBox, {
tpl:'<tpl for="."><div ext:qtip="{tooltip}" class="x-combo-list-item">{item}</div></tpl>',
selectPrev:function () {
var ct = this.store.getCount();
var idx = 0;
if (ct > 0) {
if (this.selectedIndex == -1) {
this.select(0);
} else if (this.selectedIndex !== 0) {
idx = this.selectedIndex - 1;
this.select(this.selectedIndex - 1);
}
var el = this.view.getNode(idx);
if (el)
eventFire(el, "mouseover");
}
},
selectNext:function () {
var ct = this.store.getCount();
var idx = 0;
if (ct > 0) {
if (this.selectedIndex == -1) {
this.select(0);
} else if (this.selectedIndex < ct - 1) {
idx = this.selectedIndex + 1;
this.select(idx);
}
var el = this.view.getNode(idx);
if (el)
eventFire(el, "mouseover");
}
},
onViewOver:function (e, t) {
var item = this.view.findItemFromChild(t);
if (item) {
var index = this.view.indexOf(item);
this.select(index, false);
}
}
});
The quick tips uses the mouse event in order to position the qtip, so that’s why this isn’t happening automatically for you. Sounds like you may need to write some custom code to get this working.
I would try to attach a listener on an appropriate event to the combo (or perhaps to the combo’s picker) and use
Ext.Elementfunctions (e.g.alignToorgetPositionperhaps) to position a qtip where you want it. You may not even be able to use the QTip manager directly, and may have to make a custom Ext.Tip.Let me know if you need some more details, or if you get stuck and would like some extra hints.