You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/02/28 23:10:04 UTC

[royale-asjs] branch develop updated: solve maxlength problem in Android devices

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5079b76  solve maxlength problem in Android devices
5079b76 is described below

commit 5079b7652f5d8403ff237b9a6e6ad39390edb6f7
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri Mar 1 00:09:56 2019 +0100

    solve maxlength problem in Android devices
---
 .../org/apache/royale/jewel/beads/validators/StringValidator.as   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/StringValidator.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/StringValidator.as
index 0d219e2..4cb3ef6 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/StringValidator.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/StringValidator.as
@@ -142,9 +142,13 @@ package org.apache.royale.jewel.beads.validators
 		{
 			if (hostComponent)
             {
-                (_maxLength > 0) ?
-					hostComponent.element.setAttribute('maxlength', _maxLength) :
+                if(_maxLength > 0)
+				{
+					hostComponent.element.setAttribute('maxlength', _maxLength);
+				} else
+				{
 					hostComponent.element.removeAttribute('maxlength');
+				}
             }
 		}		
 	}