You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pu...@apache.org on 2019/12/09 10:35:40 UTC

[royale-asjs] branch develop updated: Update TextInput.as Added editable Property in MXRoyale

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

pushminakazi 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 cfe0524  Update TextInput.as Added editable Property in MXRoyale
cfe0524 is described below

commit cfe05245c58762ee50d680d45ba8e75add7cdfe7
Author: pashminakazi <42...@users.noreply.github.com>
AuthorDate: Mon Dec 9 15:35:33 2019 +0500

    Update TextInput.as Added editable Property in MXRoyale
---
 .../MXRoyale/src/main/royale/mx/controls/TextInput.as     | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as
index fc9ef0f..dd9ffce 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/TextInput.as
@@ -621,7 +621,18 @@ public class TextInput extends UIComponent implements ITextInput
      */
     public function set editable(value:Boolean):void
     {
-        if (value == _editable)
+        _editable = value;
+	COMPILE::JS
+	{
+		if(value == false) {
+			(element as HTMLInputElement).readOnly = true;
+		}
+		else {
+			 (element as HTMLInputElement).readOnly = value;
+		}
+	}
+	
+     /*   if (value == _editable)
             return;
 
         _editable = value;
@@ -629,7 +640,7 @@ public class TextInput extends UIComponent implements ITextInput
 
         invalidateProperties();
 
-        dispatchEvent(new Event("editableChanged"));
+        dispatchEvent(new Event("editableChanged")); */
     }
 
     //----------------------------------