From commits-return-1821-archive-asf-public=cust-asf.ponee.io@royale.apache.org Tue Jan 30 20:52:12 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 4696418061A for ; Tue, 30 Jan 2018 20:52:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 35D6E160C54; Tue, 30 Jan 2018 19:52:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7CFE1160C53 for ; Tue, 30 Jan 2018 20:52:11 +0100 (CET) Received: (qmail 29154 invoked by uid 500); 30 Jan 2018 19:52:10 -0000 Mailing-List: contact commits-help@royale.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@royale.apache.org Delivered-To: mailing list commits@royale.apache.org Received: (qmail 29145 invoked by uid 99); 30 Jan 2018 19:52:10 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 19:52:10 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id B472A81BC2; Tue, 30 Jan 2018 19:52:09 +0000 (UTC) Date: Tue, 30 Jan 2018 19:52:09 +0000 To: "commits@royale.apache.org" Subject: [royale-asjs] branch develop updated: Patched event bubbling on the JS/HTML platform. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151734192968.7868.6850873942556867945@gitbox.apache.org> From: pent@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: royale-asjs X-Git-Refname: refs/heads/develop X-Git-Reftype: branch X-Git-Oldrev: 3eb10e4ff80ba4e2041b8a067aec8c16672bb829 X-Git-Newrev: 34dc31ac7ba5e2ffb59016e9c6e6b163a26357c6 X-Git-Rev: 34dc31ac7ba5e2ffb59016e9c6e6b163a26357c6 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. pent 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 34dc31a Patched event bubbling on the JS/HTML platform. 34dc31a is described below commit 34dc31ac7ba5e2ffb59016e9c6e6b163a26357c6 Author: Peter Ent AuthorDate: Tue Jan 30 14:54:40 2018 -0500 Patched event bubbling on the JS/HTML platform. --- .../org/apache/royale/core/HTMLElementWrapper.as | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as index 77ab263..587d190 100644 --- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as +++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/HTMLElementWrapper.as @@ -18,6 +18,8 @@ //////////////////////////////////////////////////////////////////////////////// package org.apache.royale.core { + import org.apache.royale.events.IEventDispatcher; + COMPILE::SWF { import flash.display.Sprite; @@ -286,6 +288,9 @@ package org.apache.royale.core } } var source:Object = this.getActualDispatcher_(eventType); + if (e.bubbles) { + return dispatchBubblingEvent(source, e); + } if (source == this) { return super.dispatchEvent(e); @@ -293,5 +298,18 @@ package org.apache.royale.core return source.dispatchEvent(e); } + + public function dispatchBubblingEvent(source:Object, e:Object):Boolean + { + // build the ancestors tree without setting the actual parentEventTarget + var ancestorsTree:Array = []; + var t:IEventDispatcher = source["parent"] as IEventDispatcher; + while (t != null) { + ancestorsTree.push(t); + t = t["parent"] as IEventDispatcher; + } + + return goog.events.EventTarget.dispatchEventInternal_(source, e, ancestorsTree); + } } } -- To stop receiving notification emails like this one, please contact pent@apache.org.