Absolute positioned element inside centered element with negative margin interacts incorrectly with toggling style attributes
Reported by
robbie.c...@gmail.com,
Dec 5 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce the problem: 1. Open the attached html file 2. Open develop tools 3. Select the <i> 4. Observe where the bug icon is on the page 5. Disable display:inline 6. Disable and re-enable position:absolute 7. Observe that the bug icon is in a different position from when the page loaded 8. Re-enable display:inline 9. Observice that the bug icon is still in a different position from when the page loaded 10. Disable and re-enable position:absolute 11. Observe that the bug icon is back where it was at 4 What is the expected behavior? At 9 I would expect the icon to be moved back to where it is at 4. Additionally What went wrong? The positioning seems to be depend upon the order in which the CSS rules were toggled on and off. Did this work before? N/A Chrome version: 62.0.3202.94 Channel: stable OS Version: OS X 10.12.6 Flash Version: Also observed in: Version 65.0.3285.0 (Official Build) canary (64-bit) And in Firefox: 57.0.1 (64-bit)
,
Dec 8 2017
I can reproduce this with the devtools docked to bottom. (giving a wider viewport). Fascinating. simplified the repro a bit more: 1. open https://output.jsbin.com/yihixec/quiet 2. open devtools and dock it to bottom 3. evaluate this in console: // setup wait = _ => new Promise(res => setTimeout(res, 100)); x = document.querySelector('i') // noop. sets the styles that are already applied. x.style.position = 'absolute'; await wait(); x.style.display = 'inline'; await wait(); // regress the styles x.style.position = 'relative'; await wait(); x.style.display = 'block'; await wait(); // return them back to original x.style.position = 'absolute'; await wait(); x.style.display = 'inline'; await wait(); ---------------------- It's got me stumped. :) Over to Layout team, as this isn't a DevTools bug.
,
Jan 29 2018
Unable to reproduce. |
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Dec 8 2017Labels: Needs-Triage-M62 Triaged-ET Needs-Feedback
14.0 MB
14.0 MB View Download