Nested fixed position elements are incorrectly positioned when parents have CSS transform applied
Reported by
benjamin...@turner.com,
Aug 18 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36 Steps to reproduce the problem: 1. Create a document with nested elements, all of which have "position: fixed". 2. Style each nested element such that they cover different portions of the viewport, e.g. four nested <div>s which are styled "width: 33%, height: 33%;" and positioned in the four corners of the viewport: "left: 0; top: 0;", "left: 0; bottom: 0;", "right: 0; top: 0;", "right: 0; bottom: 0;" 3. Apply any transform (e.g., "transform: rotate(0deg)") one or more outer nested elements. 4. Observe that the inner element adjusts its dimensions as if the inner element were its containing context, instead of the viewport What is the expected behavior? Fixed position elements should always be sized and positioned relative to the viewport. What went wrong? Applying any transform to the outer fixed-position element causes nested fixed-position elements to be incorrectly laid out. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 60.0.3112.101 Channel: stable OS Version: OS X 10.12.5 Flash Version: Demonstration: https://codepen.io/anon/pen/mMXjjE?editors=1100 Uncomment one or more of the transform rules in the CSS.
,
Aug 22 2017
benjamin.black@ Thanks for the issue. Tested the issue on Windows 7 and Mac OS 10.12.6 with latest stable 60.0.3112.101 and Canary 62.0.3192.0 with the below steps. 1. Launched Chrome and opened the above given link. 2. Applied transform: rotate(0); for three nested elements. 3. Could observe the same behavior in both Chrome and Firefox. Please find the attached screen shot and confirm if anything is missed here. Also please provide us with the screen shots for better understanding of the issue. Thanks..
,
Sep 30 2017
Closing due to lack of feedback for over a month. Comment to reopen. |
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, Aug 21 2017