Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content shifting when opening and closing lightbox #7

Closed
neptunian opened this issue Jul 16, 2017 · 6 comments
Closed

Content shifting when opening and closing lightbox #7

neptunian opened this issue Jul 16, 2017 · 6 comments

Comments

@neptunian
Copy link
Contributor

neptunian commented Jul 16, 2017

Due to this recent commit:
99f54ed

The defaultProps prop is being defined incorrectly and therefore
if (this.props.preventContentJumping) {
will evaluate to undefined/false and content will shift instead of defaulting to not shifting.

neptunian added a commit to neptunian/react-scrolllock that referenced this issue Jul 16, 2017
@neptunian
Copy link
Contributor Author

See pull request #8

@jorrit
Copy link

jorrit commented Jul 16, 2017

A work around is to set the prop explicitly.

@neptunian
Copy link
Contributor Author

@jorrit yes but would require the user to modify the Lightbox.js source file.

@neptunian
Copy link
Contributor Author

@jossmac can we get this published on npm please :)

@gtwilliams03
Copy link

I have this same issue. Layout in react-photo-gallery looks great on load (I am also using a Lightbox). Clicking on an image opens the Lightbox and I can see the layout through the overlay still looking nice. Then I close the Lightbox and the scroll bar breaks the layout and the images wrap to the next row. If I reopen the Lightbox, the layout in react-photo-gallery looks normal again.

@gtwilliams03
Copy link

OK - I had a container div with a percentage width <div style={{ width: '96%' }}> and the disappearance and reappearance of the scroll bar was breaking the layout. I changed the width: '96%' to width: '96vw' and the layout stays intact. Passing this along in case it helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants