diff options
author | hp279 <anna.miroshnik@arcadia.spb.ru> | 2014-05-22 04:30:41 -0700 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2014-08-21 08:18:04 +0000 |
commit | 033174a9d7395baabe97d6cfbca60ed3ea6928eb (patch) | |
tree | a2583ed8884a258a203d8343e3dbaf3dc2ea9375 /client | |
parent | f247e5bb9d84326771327d619ce501c7ba2909fd (diff) | |
download | vaadin-framework-033174a9d7395baabe97d6cfbca60ed3ea6928eb.tar.gz vaadin-framework-033174a9d7395baabe97d6cfbca60ed3ea6928eb.zip |
Fix VTextField w/ InputPrompt and ShortcutListener (#13492)
Previously, VTextField value was not updated when used w/ InputPrompt and ShortcutListener.
Change-Id: I53631fe4e866dc6a861d1ea9d263dd5204ec6d7e
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTextField.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/com/vaadin/client/ui/VTextField.java b/client/src/com/vaadin/client/ui/VTextField.java index 1968c7e0a6..b402ced218 100644 --- a/client/src/com/vaadin/client/ui/VTextField.java +++ b/client/src/com/vaadin/client/ui/VTextField.java @@ -389,9 +389,8 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler, client.updateVariable(paintableId, EventId.BLUR, "", false); } - String newText = getText(); - if (!prompting && newText != null - && !newText.equals(valueBeforeEdit)) { + String newText = prompting ? "" : getText(); + if (newText != null && !newText.equals(valueBeforeEdit)) { sendValueChange = immediate; client.updateVariable(paintableId, "text", newText, false); valueBeforeEdit = newText; |