fix(mobile): enable touch scrolling in file picker modal#2420
Conversation
Fixes mobile file picker scroll bubbling to parent page. On touch devices, attempting to scroll the file list in the command palette now properly scrolls the picker content instead of the entire page. Changes: 1. CommandPanel: Added overflow-hidden to contain scrollable content and touch-action:pan-y to allow vertical touch panning within bounds 2. ScrollArea Viewport: Added overflow-y-auto to enable native scrolling for touch devices while maintaining visual scrollbar styling This isolates the file picker's scroll behavior from the parent page, preventing touch scroll events from propagating upward. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityA prior Macroscope approval was dismissed. Re-evaluating 9356faa… |
- Let the dialog backdrop capture pointer events - Keep the popup interactive while preventing viewport scroll bleed
Dismissing prior approval to re-evaluate 9356faa
Summary
overflow-hiddenand[touch-action:pan-y]to theCommandPanelcontainer so vertical touch panning is contained.overflow-y-autoto theScrollAreaviewport so native touch scrolling actually works inside the picker.Test plan
🤖 Generated with Claude Code
Note
Medium Risk
Updates shared UI primitives (
CommandPanel,ScrollArea) to change overflow/touch behavior; while small, it can affect scrolling/scrollbar behavior across multiple surfaces that useScrollArea.Overview
Fixes touch-device scrolling inside the command palette/file picker by preventing scroll gestures from bubbling to the page.
CommandPanelnow clips content (overflow-hidden) and opts into vertical touch panning ([touch-action:pan-y]) so swipe scrolling stays within the modal.ScrollArea’s viewport now usesoverflow-y-autoto ensure the list itself becomes the scroll container for native touch scrolling.Reviewed by Cursor Bugbot for commit 250e711. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix touch scrolling in file picker modal
Adds
touch-action: pan-yandoverflow-hiddento theCommandPanelroot div, andoverflow-y-autoto theScrollAreaviewport so content scrolls vertically on touch devices. These changes are incommand.tsxandscroll-area.tsx.Macroscope summarized 2c3eea4.