Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12737 closed bug (invalid)

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

Reported by: olivier.junk@… Owned by: olivier.junk@…
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);
});

Change History (2)

comment:1 Changed 7 years ago by elgreg

Owner: set to olivier.junk@…
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?

comment:2 Changed 7 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.