fix(drawer): suppress trailing click after a drag gesture#1654
Conversation
Dragging the sheet from an interactive child (e.g. a swipe-to-dismiss begun on a menu item) would still fire that child's click on release — iOS in particular synthesizes a click on the origin element even after a clear drag. Track when a gesture passes the swipe-start threshold and swallow the following click in capture phase; a plain tap is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDrawerContent에 draggedRef를 추가해 포인터 이벤트에서 드래그 상태를 관리하고, 스와이프 임계값을 넘는 드래그 뒤 발생하는 클릭을 캡처 단계에서 차단하며 해당 동작을 검증하는 테스트를 추가합니다. 변경사항DrawerContent 드래그 제스처 처리
예상 코드 리뷰 난이도🎯 3 (Moderate) | ⏱️ ~20 minutes 마음으로부터의 시
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Render the real DrawerContent and assert the contract: a gesture past the swipe-start threshold suppresses the trailing click, a plain tap clicks through, and a click-less drag resets on the next pointerdown so the following tap still fires. happy-dom drops page coordinates from fireEvent and returns no computed transform, so the test pins pageX/pageY on the native PointerEvent and seeds an identity transform + rect — mirroring the existing drag test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Alpha Preview (Stackflow SPA)
|
As-is
ScreenRecording_06-09-2026.18-50-47_1.mov
To-be
ScreenRecording_06-09-2026.19-19-31_1.mov
Summary by CodeRabbit
Bug Fixes
Tests