Prevent click event from propagating/bubbling onto Google Maps

限于喜欢 提交于 2019-12-07 00:35:30

Hmm. I just tested this and everything works for me. My only advice is to check if your div has correct html/css/positioning as it may simply be covered up by a map.

Event object is accessible by default in the handler function. If you want to access the event object you can simply access it using "event" so event.stopPropagation() should work. Keep in mind that if you pass "event" as an argument to the handler function you will get a custom Google maps click event which does not have stopPropagation method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!