-
Notifications
You must be signed in to change notification settings - Fork 988
fix(Drawer): prevent unwanted close when dismissible is false #5085
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(Drawer): prevent unwanted close when dismissible is false #5085
Conversation
0de4022 to
8137cdc
Compare
commit: |
|
nevermind, it was a bug on my setup |
benjamincanac
left a comment
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 π
|
@benjamincanac glad to help π |
Co-authored-by: Benjamin Canac <[email protected]>
π Linked issue
Resolves #4985
β Type of change
π Description
Drawer bug related closing by clicking on interactive elements like: input, switch etc when it's non-dismissible, based on the https://ui.nuxt.com/docs/components/drawer#with-interactive-background example
When
dismissible: false,overlay: false, andmodal: false, the drawer shouldn't allow interaction with background elements without closing unexpectedly.Before Fix (Bug Behavior)
dismissible: false,modal: false,overlay: falseAfter Fix (Expected Behavior)
dismissible: false,modal: false,overlay: falseProbably root cause
The
vaul-vuelibrary has click-outside detection that triggers dismissal even whendismissible: falsein certain configurations. TheDrawerContentcomponent receives pointer events from outside clicks that cause unwanted closure.Solution (Event prevention)
Following the same pattern used in
Modal.vue,Slideover.vue, andPopover.vuecomponents:dismissible: false, prevent specific outside interaction events onDrawerContentpointerDownOutsideevents to allow internal interactionsπ Checklist