From f0aaf89c18e3953500c6ae93ae2b5437bfb3dcdd Mon Sep 17 00:00:00 2001 From: Tapio Aali Date: Wed, 26 Mar 2014 11:09:23 +0200 Subject: Fixed resetting of ComboBox if focused and new items allowed (#13413). Change-Id: Ibea81666101ff119e1b3e48726224f369e59b00f --- client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 8dec26cf90..c9c1d9c50c 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -267,7 +267,9 @@ public class ComboBoxConnector extends AbstractFieldConnector implements // we have focus in field, prompting can't be set on, instead // just clear the input if the value has changed from something // else to null - if (getWidget().selectedOptionKey != null) { + if (getWidget().selectedOptionKey != null + || (getWidget().allowNewItem && !getWidget().tb + .getValue().isEmpty())) { getWidget().tb.setValue(""); } } -- cgit v1.2.3