Skip to main content

Bug Tracker

Side navigation

#12737 closed bug (invalid)

Opened October 15, 2012 07:53PM UTC

Closed October 30, 2012 09:14AM UTC

an element position().top returns wrong value inside another relative element

Reported by: olivier.junk@gmail.com Owned by: olivier.junk@gmail.com
Priority: low Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:
Description

I've made this simple demo case : http://jsfiddle.net/uKgYs/22/

When you click on the button...

In IE8 : -1

In FF15 : 0

In Cr22 : 0

The problem appears only when the outside div has a border of at least 5px.

HTML :

<input type="button" value="clicky" id="btn1" />
<div class="out" id="out">
    <div class="in" id="in">
    </div>
</div>

CSS :

 .out{
     border:solid 5px orange;
     position:relative;
}

JS (for test purpose only) :

$('#btn1').click(function(){
    alert($('#in').position().top);
});
Attachments (0)
Change History (2)

Changed October 15, 2012 08:38PM UTC by elgreg comment:1

owner: → olivier.junk@gmail.com
priority: undecidedlow
status: newpending

Could you expand on this bug report? (1) I cannot repeat the -1 in IE8 on XP (using browserstack). (2) If I change the border to 4px or remove it entirely, I'm still seeing Chrome: 0 and IE: 0. What values do you expect to see?

Changed October 30, 2012 09:14AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!