quentingiraud-ugo Β· GitHub

@quentingiraud-ugo

qg@qgandco.fr qg@qgandco.fr

…ther overlays

@quentingiraud-ugo

Closed

@vercel

@benjamincanac

@coderabbitai

πŸ“ Walkthrough

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
πŸ§ͺ Generate unit tests (beta)
  • 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.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel

@benjamincanac

@benjamincanac 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

Jan 28, 2026

benjamincanac

@vercel

coderabbitai[bot]

@benjamincanac

@vercel

@benjamincanac

Closed

Read the original on github.com β†—