Skip to main content

Bug Tracker

Side navigation

#2681 closed bug (duplicate)

Opened April 11, 2008 04:27PM UTC

Closed April 22, 2008 05:47AM UTC

Last modified March 15, 2012 09:15AM UTC

offsetLeft and offsetTop off by 2 pixels in MSIE7

Reported by: iconico Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: position Cc:
Blocked by: Blocking:
Description

If I get the offsetLeft and offsetTop in IE7 they start at 2pixels, in Firefox they correctly start at 0 pixels:

<script>

jQuery(document).ready(function(){

$("#special").mousemove(function(e){

var x = e.pageX - this.offsetLeft;

var y = e.pageY - this.offsetTop;

$('#status2').html(x +', '+ y);

});

})

</script>

<h2 id="status2">

0, 0

</h2>

<div style="margin-left:100px; width: 100px; height: 100px; background:#ccc;" id="special">

Click me anywhere!

</div>

Attachments (0)
Change History (1)

Changed April 22, 2008 05:47AM UTC by brandon comment:1

resolution: → duplicate
status: newclosed

Duplicate of #2247