Skip to content

[Help]: scrollSnapList is only returning 'one big slide' #747

Closed Answered by rodrigovallades
modulareverything asked this question in Help
Discussion options

You must be logged in to vote

Hey @davidjerleke, cheers for the fast response.

Yeah, you're right, I wouldn't be able to debug that myself either 😅

Here's a very minimal recreation which seems to be suffering from the same fate: https://codesandbox.io/p/sandbox/embla-modal-bug-r8x3s8

Toggle the modal, then try to swipe the slides up. You should see it slide up and then rest back in the original position.

@modulareverything This is related to your CSS.

  1. Your .embla__slide is flex: 0 0 50vh;, you shouldn't be dealing with vh unit here.
  2. Your .embla__container is missing height.

Take a look at this fixed sandbox:
https://codesandbox.io/p/sandbox/embla-modal-bug-fixed-jfc5wl?file=%2Fsrc%2Fstyles.css%3A13%2C20

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@modulareverything
Comment options

@davidjerleke
Comment options

Answer selected by modulareverything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
resolved This issue is resolved question Question about how to achieve something
3 participants