You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/06/11 08:04:39 UTC

[royale-asjs] branch develop updated: dispatch valueCommit from Checkbox. Should fix #857

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 6b94870  dispatch valueCommit from Checkbox.  Should fix #857
6b94870 is described below

commit 6b94870882abd456aed6900a3e9b21a84744416c
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jun 11 01:04:17 2020 -0700

    dispatch valueCommit from Checkbox.  Should fix #857
---
 .../SparkRoyale/src/main/royale/spark/components/CheckBox.as        | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
index aa7b55d..aa2dc74 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/CheckBox.as
@@ -342,6 +342,7 @@ public class CheckBox extends ToggleButtonBase
         element.appendChild(_icon.element);
         
         element.appendChild(document.createTextNode(''));
+		element.addEventListener("change", changeHandler);
         
         typeNames = 'CheckBox CheckBoxIcon';
         
@@ -380,6 +381,11 @@ public class CheckBox extends ToggleButtonBase
         return mw + 1; // factor in gap between icon and label?
     }
 
+    COMPILE::JS
+    private function changeHandler(event:Event):void
+    {
+		dispatchEvent(new Event("valueCommit"));
+    }
 }
 
 }