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

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

commit 086df1c4ef0807da0ad8f32ab0356a47e8467ca6
Author: Alex Harui <[email protected]>
AuthorDate: Wed May 16 15:16:55 2018 -0700

    fix Spark Button
---
 .../spark/components/supportClasses/ButtonBase.as  | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git 
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
 
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
index 27819cc..51438d5 100644
--- 
a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
+++ 
b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/ButtonBase.as
@@ -22,6 +22,8 @@ package spark.components.supportClasses
 COMPILE::JS
 {
     import goog.DEBUG;
+    import org.apache.royale.core.WrappedHTMLElement;
+    import org.apache.royale.html.util.addElementToWrapper;
 }
 
 /*
@@ -434,7 +436,27 @@ public class ButtonBase extends SkinnableComponent 
implements IFocusManagerCompo
         measuredWidth = Number.NaN;
         measuredHeight = Number.NaN;
     };
+    
+    /**
+     * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
+     */
+    COMPILE::JS
+    override protected function createElement():WrappedHTMLElement
+    {
+        addElementToWrapper(this,'button');
+        element.setAttribute('type', 'button');
+        
+        return element;
+    }
 
+    COMPILE::JS
+    override public function setActualSize(w:Number, h:Number):void
+    {
+        // For HTML/JS, we only set the size if there is an explicit
+        // size set. 
+        if (!isNaN(explicitWidth)) setWidth(w);
+        if (!isNaN(explicitHeight)) setHeight(h);
+    }
 }
 
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to