谷歌地图:在丢弃项目时,IE7和IE8未捕捉到mouseup事件 [英] Google map : mouseup event not catched by IE7 and IE8 when dropping item

查看:131
本文介绍了谷歌地图:在丢弃项目时,IE7和IE8未捕捉到mouseup事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解为什么这个小提琴与IE7和IE8不兼容。



目标是在地图上拖动一个气球,并捕获mouseup事件以检索放置该项目的坐标。



如果用户没有拖动气球,则所有浏览器(包括IE7和IE8)都会正确触发该事件。但是,如果用户正在拖动一个气球,IE7和IE8不会捕捉事件......



是否有人了解发生了什么?



测试小提琴:不要点击地图,只需拖放气球

注:IE7和IE8已经通过IE9开发人员选项进行了测试。

解决方案

诀窍是将图像放在< div> 的背景中,而不是使用< img> 元素



http://jsfiddle.net/5cX3t/17/



愉快的一天


I am not able to understand why this fiddle doesn't work well with IE7 and IE8.

The target is to drag a balloon on the map and catch the mouseup event to retrieve the coordinates where the item has been dropped.

The event is fired correctly on all browsers (IE7 and IE8 included) if the user is not dragging a balloon. But, if the user is dragging a balloon, IE7 and IE8 don't catch the event...

Is there someone to understand what is happening?

To test the fiddle : do not click on the map, just drag and drop balloons

Note : IE7 and IE8 have been tested through the IE9 developer options

解决方案

It is fixed. The trick was to place the image in background of a <div> and not use <img> element

http://jsfiddle.net/5cX3t/17/

Have a nice day

这篇关于谷歌地图:在丢弃项目时,IE7和IE8未捕捉到mouseup事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆