diff options
author | Tapio Aali <tapio@vaadin.com> | 2014-03-26 11:09:23 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-04-14 14:50:44 +0000 |
commit | f0aaf89c18e3953500c6ae93ae2b5437bfb3dcdd (patch) | |
tree | 2f8628f8f7bbef79f4295be37c67119d58370ff2 /client | |
parent | e033fcda3537290a2db1b33ab5e7d5264639f1bb (diff) | |
download | vaadin-framework-f0aaf89c18e3953500c6ae93ae2b5437bfb3dcdd.tar.gz vaadin-framework-f0aaf89c18e3953500c6ae93ae2b5437bfb3dcdd.zip |
Fixed resetting of ComboBox if focused and new items allowed (#13413).
Change-Id: Ibea81666101ff119e1b3e48726224f369e59b00f
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 4 |
1 files changed, 3 insertions, 1 deletions
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(""); } } |