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 c65014a  jewel-textinput: add setFocus() method to jewel text based 
inputs
c65014a is described below

commit c65014adfd4913f8f08be3f40cc6c16e658b13ca
Author: Carlos Rovira <[email protected]>
AuthorDate: Tue Jan 28 20:07:07 2020 +0100

    jewel-textinput: add setFocus() method to jewel text based inputs
---
 .../jewel/supportClasses/textinput/TextInputBase.as      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/textinput/TextInputBase.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/textinput/TextInputBase.as
index 6ccba24..802db64 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/textinput/TextInputBase.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/textinput/TextInputBase.as
@@ -247,5 +247,21 @@ package org.apache.royale.jewel.supportClasses.textinput
             _positioner.royale_wrapper = this;
                        _positioner.appendChild(element);
                }
+
+        /**
+         *  set focus on the text box programatically
+         * 
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.7
+         */
+               public function setFocus():void
+               {
+            COMPILE::JS
+            {
+                element.focus();
+            }
+        }
        }
 }

Reply via email to