Side navigation
#8482 closed bug (fixed)
Opened March 09, 2011 06:16AM UTC
Closed July 06, 2012 02:04PM UTC
position() on AREA element errors in IE (tested IE 7 and 8)
Reported by: | siva.dirisala@gmail.com | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | offset | Version: | 1.5.1 |
Keywords: | ie6 ie7 ie8 | Cc: | |
Blocked by: | Blocking: |
Description
The following works in Firefox but not IE (tested 7 and 8).
<html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <img id="logo" src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif" usemap="#imgmap"> <map name="imgmap" id="imgmap"> <area shape="rect" coords="0,0,200,50" onclick="alert($(this).position().top);return false;"> </map> </body> </html>
The problem is with the offsetParent function. In this function, doing jQuery.css(offsetParent,"position") on the MAP element seems to error out in IE.
This is the reason some of the tooltip plugins like the JQuery Tools tooltip plugin don't work.
Attachments (0)
Change History (6)
Changed March 09, 2011 06:24AM UTC by comment:1
Changed March 09, 2011 02:38PM UTC by comment:2
component: | unfiled → offset |
---|---|
keywords: | → needsreview |
priority: | undecided → high |
status: | new → open |
Confirmed. Seems to exist going as far back as 1.3.2, but does not exist in 1.2.6
Edge: http://jsfiddle.net/rwaldron/hceHw/1/
1.3.2: http://jsfiddle.net/rwaldron/hceHw/4/
1.2.6: http://jsfiddle.net/rwaldron/hceHw/5/
The issue is at line 228 of src/offsets.js
jQuery.fn.extend({ position: function() { ... parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); ... }, ...
Changed June 01, 2012 03:13AM UTC by comment:3
this may be related to this:
Seeing that the example has no doctype declaration... IE Quirks mode is a scary place.
Changed June 01, 2012 01:46PM UTC by comment:4
The test cases from rwaldron have an HTML5 doctype in jsFiddle so I don't think that's it.
Changed June 26, 2012 02:00AM UTC by comment:5
keywords: | needsreview → ie6 ie7 ie8 |
---|
The above code saved at http://jsfiddle.net/hceHw/