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

aharui 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 9baddb5  Chrome doesn't provide data in the InputEvent so use the 
element instead.  Fixes #662
9baddb5 is described below

commit 9baddb5d451dd23a270ace6d5c471f512d0c8804
Author: Alex Harui <[email protected]>
AuthorDate: Thu Jan 9 02:13:39 2020 -0800

    Chrome doesn't provide data in the InputEvent so use the element instead.  
Fixes #662
---
 .../org/apache/royale/html/accessories/RestrictTextInputBead.as       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/accessories/RestrictTextInputBead.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/accessories/RestrictTextInputBead.as
index bf89eb4..b80b467 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/accessories/RestrictTextInputBead.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/accessories/RestrictTextInputBead.as
@@ -153,7 +153,8 @@ package org.apache.royale.html.accessories
         COMPILE::JS
         private function validateInput(event:BrowserEvent):void
         {            
-            var data:String = event["data"];
+            var host:UIBase = _strand as UIBase;
+            var data:String = (host.element as HTMLInputElement).value;
             
             if (restrict && data != null && data.length > 0)
             {
@@ -174,7 +175,6 @@ package org.apache.royale.html.accessories
                 {
                     event["returnValue"] = false;
                     if (event.preventDefault) event.preventDefault();
-                    var host:UIBase = _strand as UIBase;
                     (host.element as HTMLInputElement).value = out;            
        
                 }
             }

Reply via email to