-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi.
Not so long ago I asked about removing blinking cursor from Datebox
.
forum.zkoss.org/question/99670/zk-datebox-cursor-appears-through-popup-window-in-ie-10/
I tried same strategy for Combobox
zk.afterLoad('zul.inp', function () {
zul.inp.InputCtrl.isPreservedFocus = function (wgt) {
return wgt.widgetName == "combobox" ? false : true };
});
and I am in trouble.
How can I remove focus from combobox's input after the popup list appears? Is it possible? I think that if focus will be removed, blinking curcor doesn't appears behind popup list.
Seems like I solve it!
New idea is to override method open of ZKoss's Combobox
.
var _Cwgt = {};
zk.override(zul.inp.Combobox.prototype, _Cwgt, {
open: function (silent) {
var id = '#' + this.uuid + '-pp'; // get id of popup
_Cwgt.open.apply(this, arguments); // call original
jq(id).focus(); // give focus to the popup
}
});
that's it.
Asked: 2015-12-18 01:20:49 +0800
Seen: 41 times
Last updated: Dec 21 '15
ZK 7.0.3 doAfterCompose is not called for GenericForwardComposer
Power of ZK Calender With Charts 2 and Other Components
ZK7 atlantic theme: vlayout/hlayout spacing
Structuring zul-code without includes?
css zk 7.0.3 with ie9 not work
Change listbox MVVM template with Java or how to let user change column order