-
Notifications
You must be signed in to change notification settings - Fork 559
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(Popover/Dropdown): prevent unintended closure on touchstart in mobile devices #1609
Conversation
Thanks 😊 |
Hi there, seems like the problem still exists for me. Dropdowns and Popovers immediately close on touch devices. I'm on the latest release 2.15.1. Thanks |
@mrclsnkpl There was a regression introduced in #1520 and fixed again in #1609 which hasn't been released yet. |
Ah, I see. Sorry, thought the fix was in 2.15.1. Thanks a lot. |
I'm still experiencing this issue on 2.15.2 |
"@nuxt/ui": "^2.18.4", dropdown на мобильных устройствах все еще не работает как надо
|
🔗 Linked issue
A previous PR #1520 changed the event listener from @touchstart.prevent to @touchstart.passive to improve performance on mobile devices. This change introduced an unintended side effect where popovers and dropdowns unintentionally close on touch interaction.
❓ Type of change
📚 Description
This pull request addresses a bug where both popover and dropdown components would unintentionally close on touch interaction (specifically the @touchstart.passive event) on mobile devices. This behavior did not occur on desktops.
While a previous change aimed to improve mobile performance by switching to @touchstart.passive, it caused this unintended side effect.
The fix introduces a check for the event.cancelable property before closing the component. This ensures the component only closes on intentional touch interactions.
Benefits:
Maintains the performance improvement introduced by the previous change.
Improves user experience on touch devices by preventing accidental closure of popovers and dropdowns.
Resource:
Easy fix for: '[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false'
📝 Checklist