This is an automated email from the ASF dual-hosted git repository.
yishayw 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 598aeff Closes #1133
598aeff is described below
commit 598aeffcd9c9a67d3bfe78b2cb244a7a21204b69
Author: Yishay Weiss <[email protected]>
AuthorDate: Tue Jul 27 20:00:49 2021 +0300
Closes #1133
---
.../beads/HideComboPopupOnMouseDownBead.as | 36 ++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/HideComboPopupOnMouseDownBead.as
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/HideComboPopupOnMouseDownBead.as
index 3b47439..af95eaf 100644
---
a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/HideComboPopupOnMouseDownBead.as
+++
b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/beads/HideComboPopupOnMouseDownBead.as
@@ -18,6 +18,13 @@
////////////////////////////////////////////////////////////////////////////////
package mx.controls.beads
{
+ COMPILE::JS
+ {
+ import org.apache.royale.core.WrappedHTMLElement;
+ }
+ import org.apache.royale.core.IChild;
+ import org.apache.royale.core.IStrandWithModelView;
+ import org.apache.royale.html.beads.IViewWithPopUp;
import org.apache.royale.utils.callLater;
import org.apache.royale.events.Event;
import org.apache.royale.events.IEventDispatcher;
@@ -51,7 +58,7 @@ package mx.controls.beads
((_strand as UIBase).topMostEventDispatcher as
IEventDispatcher).addEventListener(MouseEvent.MOUSE_DOWN,
handleTopMostEventDispatcherMouseDown);
COMPILE::JS
{
- window.addEventListener("wheel",
handleTopMostEventDispatcherMouseDown);
+ window.addEventListener("wheel",
handleWheelEvent);
}
});
}
@@ -68,8 +75,33 @@ package mx.controls.beads
((_strand as UIBase).topMostEventDispatcher as
IEventDispatcher).removeEventListener(MouseEvent.MOUSE_DOWN,
handleTopMostEventDispatcherMouseDown);
COMPILE::JS
{
- window.removeEventListener("wheel",
handleTopMostEventDispatcherMouseDown);
+ window.removeEventListener("wheel",
handleWheelEvent);
+ }
+ }
+
+ /**
+ * @royaleignorecoercion
org.apache.royale.core.WrappedHTMLElement
+ */
+ COMPILE::JS
+ private function handleWheelEvent(event:Event):void
+ {
+ var target:WrappedHTMLElement = event.target as
WrappedHTMLElement;
+ if (target)
+ {
+ var child:IChild = target.royale_wrapper as
IChild;
+ var popup:Object = ((this._strand as
IStrandWithModelView).view as IViewWithPopUp).popUp;
+ while (child)
+ {
+ if (child == popup)
+ {
+ return;
+ }
+ child = child.parent as IChild;
+ }
}
+ handleTopMostEventDispatcherMouseDown(null);
}
+
+
}
}