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 82ba63b  jewel-tooltip: listen on change events from target and uses 
ROLL events instead MOUSE counterparts to avoid trigger on childs of the 
listener object (solves #696)
82ba63b is described below

commit 82ba63b283e94aad6f214171a74ca8e9dc825cfb
Author: Carlos Rovira <[email protected]>
AuthorDate: Mon Jan 27 12:45:36 2020 +0100

    jewel-tooltip: listen on change events from target and uses ROLL events 
instead MOUSE counterparts to avoid trigger on childs of the listener object 
(solves #696)
---
 .../royale/org/apache/royale/jewel/beads/controls/ToolTip.as  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
index ba8b9ef..13ca1d5 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/controls/ToolTip.as
@@ -131,10 +131,15 @@ package org.apache.royale.jewel.beads.controls
                        //ToolTip in iOS produces a bad behaviour, used in a 
button and user has to do a second touch to trigger click event
                        if(OSUtils.getOS() != OSUtils.IOS_OS)
                        {
-               
IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OVER, 
rollOverHandler, false);
+               
IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OVER, 
rollOverHandler, false);
                        }
                }
 
+               protected function changeHandler(event:Event):void
+               {
+                       tt.html = toolTip;
+               }
+
                /**
                 * @private
                 * @royaleignorecoercion org.apache.royale.core.IUIBase
@@ -145,7 +150,8 @@ package org.apache.royale.jewel.beads.controls
                        if (!toolTip || tt)
                                return;
 
-            IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT, 
rollOutHandler, false);
+                       IEventDispatcher(_strand).addEventListener("change", 
changeHandler, false);
+            IEventDispatcher(_strand).addEventListener(MouseEvent.ROLL_OUT, 
rollOutHandler, false);
 
             var comp:IUIBase = _strand as IUIBase;
             host = UIUtils.findPopUpHost(comp);
@@ -223,6 +229,7 @@ package org.apache.royale.jewel.beads.controls
          */
         protected function rollOutHandler(event:MouseEvent):void
         {
+                       IEventDispatcher(_strand).removeEventListener("change", 
changeHandler, false);
                        
IEventDispatcher(_strand).removeEventListener(MouseEvent.MOUSE_OUT, 
rollOutHandler, false);
                        
                        var comp:IUIBase = _strand as IUIBase;

Reply via email to