Graphics + mouse-down + alert = boom

1002
4
Jump to solution
06-05-2014 08:48 AM
ReneRubalcava
Frequent Contributor
So I'm having some difficulty using the mouse-down event for layers.
If I have have an alert popup on a mouse-down event, the map pan gets stuck.

Here is a jsbin
http://jsbin.com/pixima/1/

I've tried manually firing off click events or other mouse-up/down events, but I can't get the map unstuck.
Has anyone come across this and more importantly, know how to fix it.

Thanks.
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor
I came across something similar to this when examining this GitHub demo. In the discussion, the author discovered 
it was event bubbling that was causing the problem, fixed by using the Dojo event.stop(e) method.

View solution in original post

0 Kudos
4 Replies
derekswingley1
Frequent Contributor
Haven't seen that before. I'll do some research and post back here.
0 Kudos
KenBuja
MVP Esteemed Contributor
I came across something similar to this when examining this GitHub demo. In the discussion, the author discovered 
it was event bubbling that was causing the problem, fixed by using the Dojo event.stop(e) method.
0 Kudos
ReneRubalcava
Frequent Contributor
Ha, thank you good sir. event.stopPropagation() did the trick!
http://jsbin.com/pixima/3/
0 Kudos
derekswingley1
Frequent Contributor
Thanks Ken!
0 Kudos