Skip to content

Fix mouse pointer backdrop click #356

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

Closed
wants to merge 1 commit into from

Conversation

aichisuan
Copy link
Contributor

@aichisuan aichisuan commented May 16, 2025

Description

Fix #357

Checklist

@igordanchenko igordanchenko changed the title chore: optimize the click to close the mask on the pc end Fix mouse pointer backdrop click May 16, 2025
@igordanchenko
Copy link
Owner

Thank you for taking the time to address this issue and submit a PR. After reviewing the proposed changes, I believe a better approach would be to move the closeOnBackdropClick functionality from the Carousel component to the usePointerSwipe hook's onPointerUp method. Please see if you can revise your draft accordingly.

@aichisuan
Copy link
Contributor Author

aichisuan commented May 17, 2025

I implemented it in use Pointer Swiper hooks in another PR, but I feel that the code is still redundant. You can check my code. code

  1. Commented the logic in Carousel.tsx
  2. Implemented the function in usePointerSwipe.
  3. 'target === container' is not easy to judge in usePointerSwipe, so I abandoned it. If you implement it yourself, you will find it.
  4. Please be sure to review my code before merging it, because I have not looked at the code of your entire project globally, although this is just a small change.
  5. If you have a better way, you can directly close my PR and implement it yourself.

@igordanchenko
Copy link
Owner

Thank you. I'll review your other PR and will provide my feedback. And just FYI - you could push additional commits directly to this PR instead of opening a separate PR.

@igordanchenko
Copy link
Owner

Closing in favor of #358

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

Successfully merging this pull request may close these issues.

Mouse swipe navigation closes the lightbox when closeOnBackdropClick is enabled
2 participants