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

yishayw 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 a56bade5a1 Make sure slider button release works even if you're out of 
screen bounds
     new 3f72603476 Merge branch 'develop' of 
https://github.com/apache/royale-asjs into develop
a56bade5a1 is described below

commit a56bade5a14fc4981f8be883ae5e101b357ee2c7
Author: Yishay Weiss <[email protected]>
AuthorDate: Thu May 12 09:40:31 2022 +0300

    Make sure slider button release works even if you're out of screen bounds
---
 .../royale/mx/controls/sliderClasses/SliderThumb.as    | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/SliderThumb.as
 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/SliderThumb.as
index c1673e104d..82dca99a92 100644
--- 
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/SliderThumb.as
+++ 
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/sliderClasses/SliderThumb.as
@@ -214,7 +214,14 @@ package mx.controls.sliderClasses
                                // in case we go offscreen
                                
stage.removeEventListener(MouseEvent.MOUSE_MOVE, 
                                                                
stage_mouseMoveHandler);
-                               stage.removeEventListener(MouseEvent.MOUSE_UP, 
buttonReleased);
+                               COMPILE::SWF
+                               {
+                                       
stage.removeEventListener(MouseEvent.MOUSE_UP, buttonReleased);
+                               }
+                               COMPILE::JS
+                               {
+                                       
window.removeEventListener(MouseEvent.MOUSE_UP, buttonReleased);
+                               }
                                                        
                                Slider(owner).onThumbRelease(this);
                        }
@@ -363,7 +370,14 @@ package mx.controls.sliderClasses
                                systemManager.addEventListener(
                                        MouseEvent.MOUSE_MOVE, 
mouseMoveHandler, true);
 
-                               stage.addEventListener(MouseEvent.MOUSE_UP, 
buttonReleased);
+                               COMPILE::SWF
+                               {
+                                       
stage.addEventListener(MouseEvent.MOUSE_UP, buttonReleased);
+                               }
+                               COMPILE::JS
+                               {
+                                       
window.addEventListener(MouseEvent.MOUSE_UP, buttonReleased);
+                               }
                                                        
                                // in case we go offscreen
                                stage.addEventListener(MouseEvent.MOUSE_MOVE, 

Reply via email to