Repository navigation
fix: handle mobile question interactions - #11
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All reported issues have been fixed, and the mobile version is now working properly. The question table headers and Frequency column display correctly, the Surprise Me button and LeetCode links work, the question sidebar opens on tap, and normal scrolling no longer opens the sidebar. Taking the final review from @copilot. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a mobile-only interaction failure where tapping a question row (or the Surprise me control) did not open the problem details panel, blocking access to the Open on LeetCode link. It does so by explicitly handling touch activation, while keeping existing click and keyboard behaviors intact and ensuring the panel cannot be clipped by mobile overflow/stacking contexts.
Changes:
- Added
touchend-based activation for question rows with basic scroll-vs-tap detection, while preserving click and keyboard activation (and preventing Space from scrolling on activation). - Added
touchendactivation for the Surprise me button to improve reliability on mobile browsers. - Rendered the
ProblemPanelvia a portal todocument.bodyto avoid clipping/hiding due to container overflow and stacking contexts; adjusted mobile table header behavior to keep metadata visible and headers pinned appropriately.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
site/app/globals.css |
Adds touch-specific CSS (touch-action: manipulation) and updates mobile table header behavior to keep all columns available and headers pinned correctly within the scroll wrapper. |
site/app/company/[slug]/SortableQuestionTable.tsx |
Adds explicit touch handlers for row/button activation and portals the ProblemPanel to document.body to prevent mobile clipping issues. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Fixes the mobile-only failure where tapping a question row or Surprise Me did not open the problem details panel, preventing access to the Open on LeetCode link.
Changes
touchendactivation for question rows.touchendactivation for the Surprise Me button.document.bodyso mobile overflow and stacking contexts cannot hide it.Related issue
Closes #10