flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [4/5] git commit: [flex-asjs] [refs/heads/release0.8.0] - ImageButton is now a button with an image so click events are often on th e image and not the containing button. Maybe there's a better way to get the event target to not be the image, but for no
Date Thu, 25 May 2017 04:42:09 GMT
ImageButton is now a button with an image so click events are often on th e image and not the
containing button.  Maybe there's a better way to get the event target to not be the image,
but for now we'll look up one level of parenting.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/48018d58
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/48018d58
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/48018d58

Branch: refs/heads/release0.8.0
Commit: 48018d5868187b498c130dea82e1323f9e1b44e0
Parents: 0b50ba3
Author: Alex Harui <aharui@apache.org>
Authored: Wed May 24 20:32:08 2017 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Wed May 24 21:41:58 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/events/BrowserEvent.as | 27 +++++++++++++++-----
 1 file changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/48018d58/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
index d87b429..1237529 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/BrowserEvent.as
@@ -179,8 +179,13 @@ package org.apache.flex.events
 		{
 			var o:Object = wrappedEvent.currentTarget;
 
-			if (o && o.flexjs_wrapper)
-				return o.flexjs_wrapper;
+			if (o)
+			{
+				if (o.flexjs_wrapper)
+					return o.flexjs_wrapper;
+				if (o.parentNode && o.parentNode.flexjs_wrapper)
+				    return o.parentNode.flexjs_wrapper;
+			}
 			return o;
 		}
 
@@ -355,8 +360,13 @@ package org.apache.flex.events
 		{
 			var o:Object = wrappedEvent.relatedTarget;
 
-			if (o && o.flexjs_wrapper)
-				return o.flexjs_wrapper;
+			if (o)
+			{
+				if (o.flexjs_wrapper)
+					return o.flexjs_wrapper;
+				if (o.parentNode && o.parentNode.flexjs_wrapper)
+				    return o.parentNode.flexjs_wrapper;
+			}
 			return o;
 		}
 
@@ -453,8 +463,13 @@ package org.apache.flex.events
 		{
 			var o:Object = wrappedEvent.target;
 
-			if (o && o.flexjs_wrapper)
-				return o.flexjs_wrapper;
+			if (o)
+			{
+				if (o.flexjs_wrapper)
+					return o.flexjs_wrapper;
+				if (o.parentNode && o.parentNode.flexjs_wrapper)
+				    return o.parentNode.flexjs_wrapper;
+			}
 			return o;
 		}
 


Mime
View raw message