diff options
author | Anna Koskinen <anna@vaadin.com> | 2015-05-28 16:41:07 +0300 |
---|---|---|
committer | Anna Koskinen <anna@vaadin.com> | 2015-05-28 18:46:41 +0300 |
commit | c61187a34cf7fe6a38030231f3529400a34e9087 (patch) | |
tree | 95071edec4908dda86f69564ae5ce759627d3adb /client | |
parent | 96c08cd52e13e6d2ba5fee0580e9c2c7a5091a0f (diff) | |
download | vaadin-framework-c61187a34cf7fe6a38030231f3529400a34e9087.tar.gz vaadin-framework-c61187a34cf7fe6a38030231f3529400a34e9087.zip |
Input prompt shouldn't get set when input has focus (#18027)
Change-Id: Ide792fec9bf9050cea0b7616536965e42d74b16a
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTextualDate.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VTextualDate.java b/client/src/com/vaadin/client/ui/VTextualDate.java index 9055609e69..4d80b30f4f 100644 --- a/client/src/com/vaadin/client/ui/VTextualDate.java +++ b/client/src/com/vaadin/client/ui/VTextualDate.java @@ -363,7 +363,12 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler, } protected void setText(String text) { - if (inputPrompt != null && (text == null || "".equals(text))) { + if (inputPrompt != null + && (text == null || "".equals(text)) + && !this.text.getStyleName() + .contains( + VTextField.CLASSNAME + "-" + + VTextField.CLASSNAME_FOCUS)) { text = readonly ? "" : inputPrompt; setPrompting(true); } else { |