Make sure hitTestPoint works in JS for composite objects.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/1829b467 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/1829b467 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/1829b467 Branch: refs/heads/develop Commit: 1829b467e14c91ef2e1ff819d6da654b79361f52 Parents: 66b2fcb Author: yishayw <yishayj...@hotmail.com> Authored: Mon Oct 31 12:57:05 2016 +0200 Committer: yishayw <yishayj...@hotmail.com> Committed: Mon Oct 31 12:57:05 2016 +0200 ---------------------------------------------------------------------- .../main/flex/org/apache/flex/utils/DisplayUtils.as | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1829b467/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as index 54b1f99..483ab41 100644 --- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as +++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as @@ -132,11 +132,17 @@ package org.apache.flex.utils break; } elements[elements.length] = element; - if(elem && elem == element) - { - found = element; - break; - } + // work our way up the parent tree to find containing elements if applicable + var parent:Element = element; + while(parent) + { + if(elem && elem == parent) + { + found = parent; + break; + } + parent = parent.parentElement; + } visibility[visibility.length] = element.style.visibility; element.style.visibility = 'hidden'; // Temporarily hide the element (without changing the layout) }