Opened 12 years ago
Closed 10 years ago
#8945 closed bug (worksforme)
[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:
- extract http://qusi.org/drop/drop.node?/dropto_buggy.zip
- open demo.htm with webkit based browser (chrome 10.0.648.204)
- open javascript console.
- 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
Change History (10)
comment:1 Changed 12 years ago by
Owner: | set to normanzb |
---|---|
Status: | new → pending |
comment:2 Changed 12 years ago by
Status: | pending → new |
---|
sorry for inconvenient,
here is the test: http://jsfiddle.net/EYLZs/
please make sure the 'result' window is larger then 400px.
comment:3 follow-ups: 5 6 Changed 12 years ago by
Component: | unfiled → offset |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
What you're looking for is the offset, since the position is static:
comment:4 Changed 12 years ago by
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.
comment:5 Changed 12 years ago by
comment:6 Changed 12 years ago by
Replying to rwaldron:
What you're looking for is the offset, since the position is static:
ping again, hi rick, for the justification pls see comment no. 4
comment:7 Changed 12 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
comment:8 Changed 12 years ago by
I can confirm the inconsistent return value...
comment:9 Changed 12 years ago by
Status: | reopened → open |
---|
comment:10 Changed 10 years ago by
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?.