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
fix(components): Fix 'Tap to click' behavior on macOS with Edge/Chrome for Accordion and Tab #2725
base: canary
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 87d991e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@ericfabreu is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe updates focus on refining the Changes
Assessment against linked issues
Recent Review DetailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please include the changeset file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please sync with main
once. I think some code has been outdated.
Can this fix be extended to the Switch component? Same issue is occurring there |
…fying the dropdown component
Would that be issue #2765? I haven't been able to reproduce it on my MacBook, unfortunately. Tapping or clicking on the slider on Chrome, Edge, and Safari works correctly for me. Would you happen to have any repro steps? |
I just tried reproducing, and the issue no longer appears - how embarrassing. Previously, it was having the same behavior that the Tab component was, where the component was only sporadically registering the clicking from the Mac touchpad. But given that I can't reproduce the issue anymore, we can call this moot. |
+1 - I get this issue on arc browser and its not just in my app itself. Thought this was a mistake or some plugin i use. Another note is that when i click on the tab option multiple times - somehow it finally picks it up and shows the code preview. So as though am not contributing much to this solution - i share that its a big issue - at least for me. Thanks for all your hardwork. |
📝 Description
A few components (accordion, tabs, and dropdown menu) don't seem to register a click when the user taps on them with the trackpad on macOS with the "Tap to click" option enabled on Edge and Chrome. However, a full click on the trackpad will still trigger the correct event without any issues. Tapping on Safari also works as expected.
Solution: moving the
onClick
definition to themergeProps
section instead of leaving it outside fixes this issue while preserving all existing functionality.⛳️ Current behavior (updates)
Here's a quick video showing what happens when tapping on the tabs on the NextUI documentation page on Edge/Chrome. The tabs only update when I start fully clicking on the trackpad instead of tapping to click.
Screen.Recording.2024-04-12.at.7.56.06.PM.mov
🚀 New behavior
Tapping on accordions, dropdown menu items, and tabs with the trackpad on macOS now works as expected. Here's a link to a Codesandbox with these changes: codesandbox.io.
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit