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

RESOLVED DUPLICATE of bug 591718

Status

()

Core
CSS Parsing and Computation
RESOLVED DUPLICATE of bug 591718
6 years ago
6 years ago

People

(Reporter: Andrew Udvare, Unassigned)

Tracking

({testcase})

7 Branch
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

664 bytes, text/html
Details
(Reporter)

Description

6 years ago
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.

Updated

6 years ago
Component: Developer Tools → General
QA Contact: developer.tools → general
(Reporter)

Comment 1

6 years ago
iOS: Same result as Chrome
Someone should test IE10 msTransform

Updated

6 years ago
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system

Comment 2

6 years ago
This needs a simple testcase (jQuery not included)
Keywords: testcase-wanted
(Reporter)

Comment 3

6 years ago
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

Comment 4

6 years ago
Created attachment 566244 [details]
testcase

Updated

6 years ago
Keywords: testcase-wanted → 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
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 591718
You need to log in before you can comment on or make changes to this bug.