New issue
Advanced search Search tips

Issue 823332 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug


Participants' hotlists:
Hotlist-1


Sign in to add a comment

position: fixed element with 100% width sized to scroll container rather than viewport width

Reported by alex4j...@gmail.com, Mar 19 2018

Issue description

(smcgruer@ edit: New readers, please see comment #8 and below for the root cause; it is not animation related.)

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

Steps to reproduce the problem:
1. Open up https://dev-54ta5gq-brnfxpdrafhks.de-1.platformsh.site/ (dev branch of a work in progress webpage
2. Change device (device toolbar) to e.g. Nexus 5X
3. Reload page

What is the expected behavior?
Usually the drawer-toggle (.drawer-toggle) should be fixed on the upper right of the page.

What went wrong?
The button (.drawer-toggle) is animated in the same manner as .heading-primary--sub wich has a `animation: moveInRight 6s;` on it.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.186  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

This bug apparently also affects Chrome on Android.
Chrome on iOS doesn't seem to be affected.
 

Comment 1 by sunxd@chromium.org, Mar 19 2018

Cc: flackr@chromium.org smcgruer@chromium.org sunxd@chromium.org
Labels: Needs-Feedback OS-Android
Status: Available (was: Unconfirmed)
The web page does show different behavior on chrome compared to firefox. However I didn't see the button animated, it remains hidden while the animation is running and appear after it finishes.

Hi alex4jank@, can you point out the code that animates the .heading-primary--sub elements?

Comment 2 by alex4j...@gmail.com, Mar 20 2018

Hi sunxd@

You can find all custom styles (SCSS) in this gist.

https://gist.github.com/jankal/ebda1b527dc869895b81af58572224e7

It's important to say we also used the Bootstrap Framework v4 in this project.

Comment 3 by alex4j...@gmail.com, Mar 20 2018

sunxd@ your're right. The button remains out of sight and becomes visible when the animation finished. The problem remains: The button is hidden on first sight.
While trying to debug, I noticed that making drawer-toggle's parent position: relative solves the problem. Also, as you have already said above, when the problem occurs, the drawer-toggle is out of sight  until the animations end; and it is constantly 84px right of its actual position until the end of animations.

Comment 5 Deleted

Comment 6 by alex4j...@gmail.com, Mar 20 2018

Our leading interface developer told me today about some tests he conducted:

Apparently this issue only affects the span.heading-primary--sub. When applying the same @keyframes animation to the span.heading-primary--main, this behaviour doesn't occur.
I haven't verified this yet.
(Bad typo in previous comment completely changes the meaning! Correcting.)

What is happening here is that the translateX widens the scroll container. We then widen .top-header to fit this width (see attached image), which causes the menu icon to go off the screen. As the translateX reduces to 0 the scroll container shrinks to the original size, returning the menu to the screen. The reason for the sudden pop-in is issue 713913; it's not really relevant here. 

I'm not sure what the correct layout behavior is here, given that Firefox doesn't widen .top-header. Let me construct a smaller test-case and run it through the various browsers.
Screenshot from 2018-03-20 13-55-42.png
667 KB View Download
Components: -Blink>Animation Blink>Layout
Labels: -OS-Windows -Needs-Feedback -Arch-x86_64 -Hotlist-Interop
Owner: ----
Status: Available (was: Started)
Ah, a very interesting discovery. I am able to reproduce this behavior when using devtools in responsive mode, but not when compositing things and just having a small window. I am also able to reproduce on Android.

Importantly, I have a minimal repro that requires only style and layout so this is a layout bug, not animations. The fixed-position header is being sized to the width of the scroll container rather than to the width of the viewport.

See attached test-case. On Android or under device emulation in devtools the body width and fixed position element width differ.
test.html
1.0 KB View Download
Status: Untriaged (was: Available)
Summary: position: fixed element with 100% width sized to scroll container rather than viewport width (was: Animation on CSS-Element (moveInLeft/moveInRight) also affects other elements)
Description: Show this description

Comment 12 by e...@chromium.org, Mar 21 2018

Components: Blink>Compositing
Status: Available (was: Untriaged)
Considering that there is a test case available now, we worked around the bug on that URL I posted in comment #1. So it's not shown on there anymore.

Sign in to add a comment