Skip to main content

Bug Tracker

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: Owned by:
Priority: high Milestone:
Component: offset Version: 1.5.1
Keywords: ie6 ie7 ie8 Cc:
Blocked by: Blocking:

The following works in Firefox but not IE (tested 7 and 8).

<script src=""></script>
<img id="logo" src="" usemap="#imgmap">
<map name="imgmap" id="imgmap">
<area shape="rect" coords="0,0,200,50" onclick="alert($(this).position().top);return false;">

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

The above code saved at

Changed March 09, 2011 02:38PM UTC by rwaldron comment:2

component: unfiledoffset
keywords: → needsreview
priority: undecidedhigh
status: newopen

Confirmed. Seems to exist going as far back as 1.3.2, but does not exist in 1.2.6




The issue is at line 228 of src/offsets.js

	position: function() {

	parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();



Changed June 01, 2012 03:13AM UTC by anonymous 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 dmethvin 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 dmethvin comment:5

keywords: needsreviewie6 ie7 ie8

Changed July 06, 2012 02:04PM UTC by Nowres Rafid comment:6

resolution: → fixed
status: openclosed

Fix #8482, offsetParent should not return null. Closes gh-847.

Changeset: aaf134bb7092efe7b450fc08ca5cc3c53cb00d76