IDEMPIERE-2146 Combobox behaves strange when used with keyboard.

This commit is contained in:
Heng Sin Low 2014-08-21 23:44:42 +08:00
parent 8b06047bb9
commit a2071804c1
1 changed files with 10 additions and 1 deletions

View File

@ -152,6 +152,8 @@ ContextMenuListener, IZoomableEditor
getComponent().setAutodrop(true);
getComponent().addEventListener(Events.ON_BLUR, this);
getComponent().addEventListener(Events.ON_CHANGING, this);
getComponent().addEventListener(Events.ON_OPEN, this);
getComponent().addEventListener("onPostSelect", this);
boolean zoom= false;
if (lookup != null)
@ -414,6 +416,7 @@ ContextMenuListener, IZoomableEditor
} finally {
onselecting = false;
}
Events.echoEvent("onPostSelect", getComponent(), null);
}
else if (Events.ON_BLUR.equalsIgnoreCase(event.getName()))
{
@ -444,7 +447,13 @@ ContextMenuListener, IZoomableEditor
}
} else if (event.getName().equals(Events.ON_CHANGING)) {
onChanging((InputEvent) event);
}
} else if (event.getName().equals("onPostSelect")) {
if (getComponent().isOpen()) {
getComponent().select();
getComponent().setOpen(false);
getComponent().setOpen(true);
}
}
}
private void onChanging(InputEvent event) {