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

Interacting with a dropdown within the slider starts drag and drop behaviour #394

Closed
1 task done
ChristianHoffmannS2 opened this issue Nov 11, 2022 · 8 comments · Fixed by #421
Closed
1 task done
Labels
bug Something isn't working resolved This issue is resolved

Comments

@ChristianHoffmannS2
Copy link

ChristianHoffmannS2 commented Nov 11, 2022

Bug is related to

  • embla-carousel (core package)

Embla Carousel version

  • v7.0.0

Describe the bug

  • When interacting with a dropdown element inside of the slides, safari will be locked into free-drag state

CodeSandbox

- The link to a CodeSandbox that demonstrates the bug clearly.

Steps to reproduce

  1. Go to the sandbox with a safari browser
  2. Click on the dropdown and make a selection
  3. Move the mouse without clicking anything
  4. See error

Expected behavior

  • Interacting with input elements should not be an interaction with the slider

Additional context

  • This might effect mobile safari as well. This might be related to drag- and touch events.
  • Behaviour might be fixed with a stopPropagation at the right place
  • Its unclear why this only happens when using Safari
@ChristianHoffmannS2 ChristianHoffmannS2 added the bug Something isn't working label Nov 11, 2022
@davidjerleke
Copy link
Owner

davidjerleke commented Nov 11, 2022

Hi @ChristianHoffmannS2,

Thank you for your bug report. I can’t find a dropdown in the provided CodeSandbox? Did you share the wrong link?

Best,
David

@davidjerleke davidjerleke added awaiting response Issue is awaiting feedback missing test case or details Issue is missing important details or a test case that reproduces the problem labels Nov 12, 2022
@davidjerleke
Copy link
Owner

Hi again @ChristianHoffmannS2,

Not to rush you or anything, but have you seen my response? Do you want to pursue this?

Best,
David

@ChristianHoffmannS2
Copy link
Author

ChristianHoffmannS2 commented Nov 19, 2022

Hi again @ChristianHoffmannS2,

Not to rush you or anything, but have you seen my response? Do you want to pursue this?

Best, David

Hi David,

I am sorry that I missed out your response!

Does this include it?

https://codesandbox.io/s/embla-carousel-dragfree-react-forked-e3mvkh?file=/src/js/EmblaCarousel.js

@davidjerleke
Copy link
Owner

davidjerleke commented Nov 19, 2022

Hi @ChristianHoffmannS2,

Thanks. That’s the CodeSandbox 🙂. I can confirm that this is a bug. Scanning the code, it seems to be a simple mistake because the select name is missing in the list of elements that shouldn’t trigger dragging.

I can create a CodeSandbox an add select to that list if you wouldn’t mind testing it?

Kindly,
David

@davidjerleke davidjerleke removed the missing test case or details Issue is missing important details or a test case that reproduces the problem label Nov 19, 2022
@ChristianHoffmannS2
Copy link
Author

Hi @davidjerleke,

thanks. That would be good to test against :)

@davidjerleke
Copy link
Owner

davidjerleke commented Nov 21, 2022

Sorry @ChristianHoffmannS2,

I’ve must have been really tired when writing my previous comment. The node type SELECT is in that list. I will have to investigate this a bit more to understand why this is happening.

I will let you know when I have something.

Best,
David

@ChristianHoffmannS2
Copy link
Author

All good @davidjerleke .

I didn't payed enough attention neither :)

@davidjerleke davidjerleke removed the awaiting response Issue is awaiting feedback label Jan 9, 2023
@davidjerleke davidjerleke linked a pull request Jan 20, 2023 that will close this issue
@davidjerleke davidjerleke added the resolved This issue is resolved label Jan 20, 2023
davidjerleke added a commit that referenced this issue Jan 20, 2023
@davidjerleke
Copy link
Owner

davidjerleke commented Jan 20, 2023

Hi @ChristianHoffmannS2,

This bug has been fixed in v7.0.7. Give it a go if you like. Thanks for creating the bug report 👍.

Cheers,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants