summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2014-06-13 18:07:48 +0300
committerVaadin Code Review <review@vaadin.com>2014-06-17 04:48:13 +0000
commitdc08a1c857d75e964a47842f4a2a9538878457b9 (patch)
tree833f60c1c3564bcb670b3b22f33ae027fe7e2758 /client
parent4e68548c1a28746fdd74a7465a12fb9e67856044 (diff)
downloadvaadin-framework-dc08a1c857d75e964a47842f4a2a9538878457b9.tar.gz
vaadin-framework-dc08a1c857d75e964a47842f4a2a9538878457b9.zip
ComboBox no longer displays input prompt if disabled or read-only (#10573)
Change-Id: I3e0ad83bc5ec4a98a0c8e7658dfb606c6c5dc191
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VFilterSelect.java2
-rw-r--r--client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java6
2 files changed, 5 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java
index a1de2c2b6d..d4e76e07a6 100644
--- a/client/src/com/vaadin/client/ui/VFilterSelect.java
+++ b/client/src/com/vaadin/client/ui/VFilterSelect.java
@@ -1716,7 +1716,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler,
setPromptingOff(text);
selectedOptionKey = currentSuggestion.key;
} else {
- if (focused) {
+ if (focused || readonly || !enabled) {
setPromptingOff("");
} else {
setPromptingOn();
diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
index c3cdb43703..2e64fcba46 100644
--- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
+++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
@@ -303,8 +303,10 @@ public class ComboBoxConnector extends AbstractFieldConnector implements
* ALWAYS set the prompting style at this point, even though we
* think it has been set already...
*/
- getWidget().prompting = false;
- getWidget().setPromptingOn();
+ getWidget().setPromptingOff("");
+ if (getWidget().enabled && !getWidget().readonly) {
+ getWidget().setPromptingOn();
+ }
} else {
// we have focus in field, prompting can't be set on, instead
// just clear the input if the value has changed from something