From c61187a34cf7fe6a38030231f3529400a34e9087 Mon Sep 17 00:00:00 2001 From: Anna Koskinen Date: Thu, 28 May 2015 16:41:07 +0300 Subject: Input prompt shouldn't get set when input has focus (#18027) Change-Id: Ide792fec9bf9050cea0b7616536965e42d74b16a --- client/src/com/vaadin/client/ui/VTextualDate.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client') 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 { -- cgit v1.2.3