β¦ther overlays
Walkthrough
Adds a new pointerDownOutside utility and exports a PointerDownOutsideOptions interface with an optional scrollable flag. The utility guards overlay dismissal for pointer-down events when the event target is disconnected or when clicks land on scrollbars (if scrollable is true). Components Modal, Drawer, Popover, and Slideover import and wire pointerDownOutside into their content event handlers. Also adds a Nuxt playground modal example that invokes useToast() and a showToast handler to demonstrate toast interactions.
Estimated code review effort
π― 3 (Moderate) | β±οΈ ~20 minutes
π₯ Pre-merge checks | β 5 β Passed checks (5 passed)| Check name | Status | Explanation |
|---|---|---|
| Title check | β Passed | The PR title accurately describes the main change: fixing unexpected modal closure on touch devices when interacting with overlays. |
| Description check | β Passed | The PR description is comprehensive and clearly related to the changeset, explaining the problem, solution, and testing approach. |
| Linked Issues check | β Passed | The code changes comprehensively address all objectives: prevents modal closure when touch targets are disconnected from DOM or belong to other dismissable layers [#5694]. |
| Out of Scope Changes check | β Passed | All changes are directly scoped to fixing the touch handling issue: utility function for pointer handling, updates to overlay components (Modal, Drawer, Popover, Slideover), and a playground example. |
| Docstring Coverage | β Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
β¨ Finishing touches- π Generate docstrings
- Create PR with unit tests
- Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
β€οΈ ShareComment @coderabbitai help to get the list of available commands and usage tips.
benjamincanac
changed the title
fix(Modal): prevent unexpected close on touch when interacting with other overlays
fix(Drawer/Modal/Popover/Slideover): prevent unexpected close on touch when interacting with other overlays