Side navigation
#8945 closed bug (worksforme)
Opened April 22, 2011 10:24AM UTC
Closed October 19, 2012 03:01PM UTC
[webkit] position() return incorrect left coordinate when html direction set to rtl
Reported by: | normanzb | Owned by: | normanzb |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | offset | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Repro Steps:
1. extract http://qusi.org/drop/drop.node?/dropto_buggy.zip
2. open demo.htm with webkit based browser (chrome 10.0.648.204)
3. open javascript console.
4. type: jQuery('.nested-wrapper').position()
Actual result:
the value of 'left' is always 8, no matter how wide the window is.
Expected Result:
the value of 'left' should be the distance between body/html to nested-wrapper.
How the position() in other browser behave:
Firefox: pass
Safari: fail, same as chrome.
IE9: pass
IE8: pass
Attachments (0)
Change History (10)
Changed April 22, 2011 11:07AM UTC by comment:1
owner: | → normanzb |
---|---|
status: | new → pending |
Changed April 23, 2011 05:44PM UTC by comment:2
status: | pending → new |
---|
sorry for inconvenient,
here is the test:
please make sure the 'result' window is larger then 400px.
Changed April 23, 2011 05:53PM UTC by comment:3
component: | unfiled → offset |
---|---|
priority: | undecided → low |
resolution: | → worksforme |
status: | new → closed |
What you're looking for is the offset, since the position is static:
Changed April 23, 2011 06:08PM UTC by comment:4
_comment0: | hi rwaldron, \ \ did you tried the test with firefox? at least i see *inconsistent returning value*. \ \ I think the value returned in firefox is correct, because in this case, the offsetParent is body/html, and offsetLeft definitely should be the distance between left edge of body/html to the right edge of wrapper. \ \ → 1303582277349421 |
---|---|
_comment1: | hi rwaldron, \ \ did you tried the test with firefox? at least i see *inconsistent returning value*. \ \ I think the value returned in firefox is correct, because in this case, the offsetParent is body/html, and offsetLeft definitely should be the distance between left edge of body/html and the right edge of wrapper. \ \ → 1303582294930460 |
hi rwaldron,
did you tried the test with firefox? at least i see *inconsistent returning value*.
I think the value returned in firefox is correct, because in this case, the offsetParent is body/html, and offsetLeft definitely should be the distance between left edge of body/html and the left edge of wrapper.
Changed April 23, 2011 06:42PM UTC by comment:5
Replying to [comment:3 rwaldron]:
What you're looking for is the offset, since the position is static: http://jsfiddle.net/rwaldron/rUssW/
## post a comment to @rwaldron to reopen the issue,
## the reason to reopen is described in comment #4
Changed April 24, 2011 05:54PM UTC by comment:6
Replying to [comment:3 rwaldron]:
What you're looking for is the offset, since the position is static: http://jsfiddle.net/rwaldron/rUssW/
ping again, hi rick, for the justification pls see comment no. 4
Changed April 25, 2011 03:04PM UTC by comment:7
resolution: | worksforme |
---|---|
status: | closed → reopened |
Changed April 25, 2011 03:16PM UTC by comment:8
I can confirm the inconsistent return value...
Changed April 30, 2011 08:10PM UTC by comment:9
status: | reopened → open |
---|
Changed October 19, 2012 03:01PM UTC by comment:10
resolution: | → worksforme |
---|---|
status: | open → closed |
this is working on edge (and all the way back to at least 1.6.4, both results are consistent:
http://gyazo.com/55b067d27f723b423a6399c1c64af701.png?1350658538
http://gyazo.com/bacd3f4281cf349605e058bb5f9bacce.png?1350658747
I suspect one of the browsers fixed a bug.
Thanks for submitting a ticket to the jQuery Project! Ideally, all tickets should be submitted with a test case on http://jsfiddle.net, however I tried downloading the zip file you linked us to and got a restricted access error. Could you kindly reproduce the code on jsFiddle so we can more easily test this?.