Closed Bug 693501 Opened 13 years ago Closed 13 years ago

-moz-transform: translate(x, y) does not update left or top values returned by getBoundingClientRect

Categories

(Core :: CSS Parsing and Computation, defect)

7 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 591718

People

(Reporter: audvare, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

664 bytes, text/html
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.54 Safari/535.2

Steps to reproduce:

jQuery's offset() functions returns the current position of an element including the translation in Chrome, but not in Firefox.

http://jsfiddle.net/D3RKs/4/

jQuery's offset() function:
http://code.jquery.com/jquery-latest.js (look for 'if ( "getBoundingClientRect" in document.documentElement ) {')


Actual results:

Firefox returns the original CSS attribute (0).
Chrome returns 50.


Expected results:

I am not sure 100% on the upcoming standard, but if right now Chrome is going to return the offset with translated values (in scrollTop), Firefox should probably do the same. Currently for a site I am working on, I have a Firefox workaround for this issue.
Component: Developer Tools → General
QA Contact: developer.tools → general
iOS: Same result as Chrome
Someone should test IE10 msTransform
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
This needs a simple testcase (jQuery not included)
Keywords: testcase-wanted
In Firefox (since 3.5 according to MDN), the jQuery code will fall into the execution path with getBoundingClientRect() and return that object or a version of that object.

I have updated the example code to use this instead of jQuery. I'm unsure about the other execution path (without getBoundingClientRect) but it would never run in Firefox since before 3.5 anyway.

In Chrome, Safari, iOS (Safari) I get 50 for top and 50 for left. In Firefox 7.0.1 I get 0 for both.

http://jsfiddle.net/D3RKs/6/
Summary: -moz-transform: translate(x, y) does not update left or top values → -moz-transform: translate(x, y) does not update left or top values returned by getBoundingClientRect
Attached file testcase
OS: Linux → All
Hardware: x86_64 → All
> I am not sure 100% on the upcoming standard

This is completely unspecified at the moment.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: