Overlay height causing scroll issue

See original GitHub issue

I had an issue where the overlay height was being set incorrectly causing a scroll issue within my site during the tour. I fixed the issue by setting the .react-joyride__overlay height to 100% !important. However, this will break on any change you put out that changes the classname. I was wondering if it would be possible to get the overlayHeight as a style option similar to the overlayColor so changes won’t break my override.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
feebabscommented, Dec 10, 2020

In your styling documentation, you have a special options object inside the styles prop. I was hoping to be able to add an overlayHeight key/value pair to this object so that the code would be something like

styles={{
    options: {
      ...
      overlayHeight: `100vh`,
      ...
    },
}}

rather than adding the overlay above the styles like this

styles={{
  overlay: { height: '100vh' }, // Fix for random scroll issue
  options: {
      ...
    },
}}

Honestly, it’s not a huge deal though. Minimal risk doing it the latter way.

2reactions
gilbarbaracommented, Dec 10, 2020

@feebabs

You can override the Overlay styles.

<Joyride styles={{ overlay: { height: '100%' } }} />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent body scrolling but allow overlay scrolling
If you have a modal and it all fit on screen so there is no scroll inside — it will not stop the...
Read more >
How to prevent body scrolling but allow overlay scrolling in CSS
Approach: To prevent body scrolling but allow overlay scrolling we have to switch the overflow to be hidden when the overlay is being...
Read more >
How to prevent overflow scrolling in CSS - LogRocket Blog
What causes the overflow scroll issue? ... We resize these boxes to fit our desired design by decreasing or increasing the height and...
Read more >
Dealing with overflow and position: sticky; | CSS-Tricks
It's like that element is ready to stick when the parent scrolls, but it never does because the height is unconstrained. Adding a...
Read more >
-webkit-overflow-scrolling - CSS: Cascading Style Sheets | MDN
The -webkit-overflow-scrolling CSS property controls whether or not touch devices use momentum-based scrolling for a given element.
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