Skip to content

Bug: .glightbox-open hides element overflowing edge of body container #561

@Stephen-X

Description

@Stephen-X

Describe the bug
A clear and concise description of what the bug is.

The .glightbox-open class, which is used to prevent scrolling when glightbox is opened:

overflow: hidden;

is currently being added to both the HTML element and the body element:

_.addClass(body, 'glightbox-open');

And it hides all elements in body that overflow their container, causing "background flashes" as elements disappear then reappear when opening and closing GLightbox.

Could we either remove the class from the body element (adding it to html should do the trick?), or switch to overflow: clip instead?

Are you able to reproduce the bug in the demo site
Yes|No.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Post the code you are using
Help me solve issues faster, if I can copy paste your code I can try to reproduce and fix the bug faster.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop:

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone:

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions