diff options
author | Henri Sara <hesara@vaadin.com> | 2013-05-21 15:57:18 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2013-05-21 15:57:18 +0300 |
commit | 158c162d688fdfa701f9c6c9035e27d9f64a312f (patch) | |
tree | 31215159be211df4cf40f1070e7681377fcce142 /client | |
parent | b1390c580cf5e9ad6adbb6067007d03fb69a92cc (diff) | |
download | vaadin-framework-158c162d688fdfa701f9c6c9035e27d9f64a312f.tar.gz vaadin-framework-158c162d688fdfa701f9c6c9035e27d9f64a312f.zip |
Do not clear combobox text unnecessarily (#10924, #11887)
Change-Id: Ica66c1d7ca05874ca5a05fb2c9651a6e4758e1d9
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 345bdc0cbb..d9eac91e2b 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -252,8 +252,11 @@ public class ComboBoxConnector extends AbstractFieldConnector implements getWidget().setPromptingOn(); } else { // we have focus in field, prompting can't be set on, instead - // just clear the input - getWidget().tb.setValue(""); + // just clear the input if the value has changed from something + // else to null + if (getWidget().selectedOptionKey != null) { + getWidget().tb.setValue(""); + } } getWidget().setSelectedItemIcon(null); getWidget().selectedOptionKey = null; |