Bug 49260 - Transform change shifts absolutely positioned element incorrectly
Summary: Transform change shifts absolutely positioned element incorrectly
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://meyerweb.com/eric/css/tests/sa...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 10:05 PST by Eric Meyer
Modified: 2022-07-12 13:54 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Meyer 2010-11-09 10:05:17 PST
If an element is transformed using a transition on hover, when the element is un-hovered and the transform undone then absolutely positioned descendant elements are put back in the wrong place.

It's a little hard to describe, so:

1. Go to http://meyerweb.com/eric/css/tests/safari/transform-jump.html
2. Hover over the blue box (the 'body' element).
3. Observe the absolutely positioned element move.  *This is as expected.*
4. Un-hover the 'body' element.
5. Observe the absolutely positioned element moved to a place other than where it started.  *This is NOT as expected.*

The moving box should go back to where it started.  It appears to move the correct distance horizontally, just in the wrong direction.  That is, if it shifts horizontally -50px during the transform, it does so again when the transform ends instead of shifting +50px horizontally.

The linked test case works as expected in Firefox.
Comment 1 Eric Meyer 2010-11-09 11:41:37 PST
Addendum: Natalie@Avallo pointed out that after doing the steps given above, if you resize the browser window the absolutely positioned element snaps back to its proper place.  (https://twitter.com/natalieAvallo/status/2080731752824833)  I think this happens even if the windows is only vertically and not horizontally resized, though it's hard to be sure I'm doing a directly-vertical resize with the mouse.
Comment 2 Simon Fraser (smfr) 2010-12-07 14:05:47 PST
I don't see any transitions in the testcase.
Comment 3 Eric Meyer 2010-12-07 17:52:19 PST
I do, when moving the mouse pointer over and then away from the blue-ish box, which is the 'body' element (as described in the testcase).  Safari Version 5.0 (5533.16).  So, apparently, did Natalie, though I don't know which version she was using.
Comment 4 Simon Fraser (smfr) 2010-12-07 18:06:16 PST
Sorry, transition to me == "CSS 3 Transition". You're using it in the general sense. I can reproduce the bug, and it's transform-related.
Comment 5 Eric Meyer 2010-12-07 18:47:17 PST
Oh, yes.  Good point.  Sorry for any confusion.
Comment 6 Brent Fulgham 2022-07-12 13:54:14 PDT
Safari, Chrome, and Firefox all agree on rendering for this test case. I don't believe there is any remaining compatibility issue.