diff options
author | John Ahlroos <john@vaadin.com> | 2013-02-20 09:44:43 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-02-20 10:17:24 +0200 |
commit | 100f252a56c4159088915e435f1ca91a64230f3f (patch) | |
tree | 4bc133c3d8ca0dd0224ba5d9229d210a97db060c /client | |
parent | 991112b4371c5b3383bd1678446641d3a6c16525 (diff) | |
download | vaadin-framework-7.0.1.tar.gz vaadin-framework-7.0.1.zip |
Merge of (#9940) to Vaadin 77.0.1
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 |