diff options
author | John Ahlroos <john@vaadin.com> | 2013-02-20 09:44:43 +0200 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2013-02-20 09:44:43 +0200 |
commit | 2788b5192330a8ac8169571b592be33972c3b016 (patch) | |
tree | 4bc133c3d8ca0dd0224ba5d9229d210a97db060c /client | |
parent | 74557919f3000f172245479e7200311a136fe258 (diff) | |
download | vaadin-framework-2788b5192330a8ac8169571b592be33972c3b016.tar.gz vaadin-framework-2788b5192330a8ac8169571b592be33972c3b016.zip |
Merge of (#9940) to Vaadin 7
Change-Id: Ie2e53c8cdba20c8265fa04e35e9469b39b21d43e
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTextField.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/client/src/com/vaadin/client/ui/VTextField.java b/client/src/com/vaadin/client/ui/VTextField.java index 1229eda093..0fbed0dd90 100644 --- a/client/src/com/vaadin/client/ui/VTextField.java +++ b/client/src/com/vaadin/client/ui/VTextField.java @@ -272,19 +272,16 @@ public class VTextField extends TextBoxBase implements Field, ChangeHandler, /** For internal use only. May be removed or replaced in the future. */ public void setMaxLength(int newMaxLength) { - if (newMaxLength >= 0 && newMaxLength != maxLength) { - maxLength = newMaxLength; - updateMaxLength(maxLength); - } else if (maxLength != -1) { - maxLength = -1; - updateMaxLength(maxLength); + if (newMaxLength == maxLength) { + return; } - + maxLength = newMaxLength; + updateMaxLength(maxLength); } /** - * This method is reponsible for updating the DOM or otherwise ensuring that - * the given max length is enforced. Called when the max length for the + * This method is responsible for updating the DOM or otherwise ensuring + * that the given max length is enforced. Called when the max length for the * field has changed. * * @param maxLength |