IDEMPIERE-3552: fix context menu don't show when disable combobox

This commit is contained in:
hieplq 2018-05-18 15:05:28 +07:00
parent 5963b4ff32
commit 4ea2c3f450
1 changed files with 4 additions and 8 deletions

View File

@ -45,13 +45,9 @@ public class Combobox extends org.zkoss.zul.Combobox implements IdSpace
}
private void override() {
this.setWidgetOverride("slideDown_", "function(pp) {"
+ " if (this.isReadonly()) return; "
+ " this.$slideDown_(pp); "
+ "}");
this.setWidgetOverride("doKeyDown_", "function(evt) {"
+ " if (this.isReadonly()) return; "
+ " this.$doKeyDown_(evt); "
// idempiere always want to show context ever on disable control
this.setWidgetOverride("shallIgnoreClick_", "function(evt) {"
+ " return false; "
+ "}");
}
@ -62,7 +58,7 @@ public class Combobox extends org.zkoss.zul.Combobox implements IdSpace
public void setEnabled(boolean enabled)
{
this.setReadonly(!enabled);
this.setDisabled(!enabled);
if (!enabled) {
//ensure list is close and not on focus
if (this.getPage() != null)