IDEMPIERE-3182:auto fill password don't work util you touch password field

a complete solution.
This commit is contained in:
hieplq 2016-09-13 14:43:24 +07:00
parent e20ad177de
commit abaf405158
2 changed files with 33 additions and 2 deletions

View File

@ -174,8 +174,6 @@ public class LoginPanel extends Window implements EventListener<Event>
}
}
onUserIdChange(AD_User_ID);
if (txtUserId.getValue().length() > 0)
txtPassword.focus();
chkRememberMe.setChecked(true);
}
if (MSystem.isZKRememberPasswordAllowed()) {

View File

@ -41,6 +41,7 @@ Copyright (C) 2007 Ashley G Ramdass.
});
zk.afterLoad('zul.wgt', function () {
// should filter out for only component inside standard window or component wish fire this event,
// or ever rise other event like start editting to distinguish with true onChange event
zk.override(zul.inp.InputWidget.prototype, "doInput_", function (evt) {
@ -62,6 +63,38 @@ Copyright (C) 2007 Ashley G Ramdass.
}
});
zk.override(zk.Widget.prototype, "onAutofill", function (evt) {
id.zk.Extend.fakeOnchange (this);//fire change event to move to edit
});
zk.override(zul.inp.Textbox.prototype, "bind_", function (dt, skipper, after) {
if (!this.$bind_)
return;
this.$bind_(dt, skipper, after);
if (this.getType () != "password"){
return;
}
this.domListen_(this.$n(), "onChange", "onAutofill");
});
zk.override(zul.inp.Textbox.prototype, "unbind_", function (dt, skipper) {
if (!this.$unbind_)
return;
this.$unbind_(dt, skipper);
if (this.getType () != "password"){
return;
}
this.domUnlisten_(this.$n(), "onChange", "onAutofill"); //unlisten
});
});
zk.afterLoad('zul.mesh', function () {