aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTapio Aali <tapio@vaadin.com>2014-03-26 11:09:23 +0200
committerVaadin Code Review <review@vaadin.com>2014-04-14 14:50:44 +0000
commitf0aaf89c18e3953500c6ae93ae2b5437bfb3dcdd (patch)
tree2f8628f8f7bbef79f4295be37c67119d58370ff2 /client
parente033fcda3537290a2db1b33ab5e7d5264639f1bb (diff)
downloadvaadin-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.java4
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("");
}
}