New issue
Advanced search Search tips

Issue 900448 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Padding increases each time a child element is replaced

Reported by mashpoes...@gmail.com, Oct 31

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36

Example URL:
https://jsfiddle.net/Mashpoe/8L1mzn6h/

Steps to reproduce the problem:
If you have a div with padding and "display: inline", each time a child div is replaced, as in "parent.removeChild(oldChild)" and "parent.appendChild(newChild)", the new child element will have more padding than the previous child, and the padding will always increase by the parent's amount of padding.

There is nothing different about the child element; it is created exactly the same each time, which you can see in the fiddle. I originally found this problem on my own website and was able to recreate it in the fiddle that I submitted.

What is the expected behavior?
If you remove a child element and then replace it with an identical one, you would expect the page to look exactly the same.

What went wrong?
Each time you replace the child element, the new child will have + 10px of padding. This is because the parent has "padding: 10px."

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? No
 I have only tested this in the latest versions of Safari, Firefox, Chrome, and Edge. Firefox and Edge do not have this issue.

Chrome version: 69.0.3497.100  Channel: n/a
OS Version: 10.0
Flash Version:
 
Cc: viswa.karala@chromium.org
Labels: Triaged-ET Target-72 M-72 FoundIn-71 FoundIn-70 FoundIn-72 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on chrome reported version# 69.0.3497.100, latest stable# 70.0.3538.77 and on latest chrome# 72.0.3596.0 with sample URL provided in comment# 0 using Mac 10.12.6, Ubuntu 17.10 and Windows-10. As this issue is seen from M-60(60.0.3112.0), hence considering this issue as Non-Regression and marking it as Untriaged.

Thanks. 
Components: -Blink Blink>Layout
Labels: Fixed-In-LayoutNG
Status: Available (was: Untriaged)

Sign in to add a comment