flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [4/8] git commit: [flex-asjs] [refs/heads/browser-event] - Need to create a chain of parent event targets.
Date Thu, 20 Jul 2017 07:05:13 GMT
Need to create a chain of parent event targets.


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

Branch: refs/heads/browser-event
Commit: e440ae9f2b9b0524de42e90da66f6c69bd7cd5ce
Parents: 36cea4f
Author: Peter Ent <pent@apache.org>
Authored: Wed Jul 19 14:43:17 2017 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Jul 19 14:43:17 2017 -0400

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/events/DragEvent.as        | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e440ae9f/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
index cb161c0..0731c75 100644
--- a/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
+++ b/frameworks/projects/DragDrop/src/main/flex/org/apache/flex/events/DragEvent.as
@@ -409,13 +409,17 @@ package org.apache.flex.events
             }
             COMPILE::JS
             {
+				// build an event target chain of ancestors so that bubbling
+				// will work for drag events on JS platform.
 				var pet:Object = target.getParentEventTarget();
 				if (!pet) {
 					var p:Object = target.parent;
-					while (p != null && !(p is IStrand)) {
+					var t:Object = target;
+					while (p != null && (p is IStrand)) {
+						t.setParentEventTarget(p);
+						t = p;
 						p = p.parent;
 					}
-					target.setParentEventTarget(p);
 				}
 				
 				(target as IEventDispatcher).dispatchEvent(event);


Mime
View raw message