question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Animations disappearing when having overflow-x: hidden on CSS

See original GitHub issue

This is:

  • Bug

Specifications

  • AOS version: latest
  • Browser: tested on Firefox, chrome

Expected Behaviour

Animations should fade in and stay there

Actual Behaviour

Animations fade in but are disappearing after animation is done

Steps to Reproduce the Problem

CSS to reproduce:

/* Google Chrome White space Bug */

html,
body {
  overflow-x: hidden;
}

Detailed Description

I use overflow-x: hidden to prevent the chrome smartphone bug and after changing some CSS out of desperation I got it working by deleting it.

Possible Solution

take out overflow-x: hidden when deploying

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

8reactions
Drewkancommented, Jul 26, 2020

The fix is easy:

Create a div with the whole body content;

in css: body>div {overflow-x:hidden;}

You can see the fix working here: https://garciaesa.adv.br/

1reaction
robphillipscommented, Oct 7, 2021

For those using the following webkit scrollbar / media query workaround:

:root {
  overflow: hidden;
  height: 100%;
}

body {
  position: relative;
  overflow-y: scroll;
  height: 100%;
}

AOS v2 fork changes window scroll listener and variables to use document.body: https://github.com/imagex/aos/tree/v2 https://github.com/imagex/aos/commit/23e7b3d5583da6dfa1f564b8224cfd60d52cac39

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appearing element disappears after animation - Stack Overflow
I suspect the element to take back its hidden value right after the animation ends and I don't know how to make its...
Read more >
overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
The overflow-x CSS property sets what shows when content overflows ... If overflow-y is hidden , scroll or auto and this property is...
Read more >
Hide Scrollbars During an Animation - CSS-Tricks
But the magic number isn't the only problem. Another problem is scrollbars. When we set max-height: 0; , we also need overflow: hidden;...
Read more >
Second scrollbar appearing and disappearing ... - GreenSock
Something must be overflowing, you can fix that by setting overflow: hidden to whatever element is getting this scroll bar. You have set ......
Read more >
Overflow Issues In CSS - Smashing Magazine
If you have overflow, then it's better to solve the root issue. Moreover, applying overflow-x: hidden to the body element is not a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found