fix: restore horizontal scrolling in narrow diff view#800
Conversation
Signed-off-by: Matt Toohey <contact@matttoohey.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 81fd800d54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| function isMobileDiffCodeTarget(target: HTMLElement): boolean { | ||
| return !!target.closest( | ||
| '.after-pane .code-container, .after-pane .lines-wrapper, .after-pane .line' | ||
| ); |
There was a problem hiding this comment.
Preserve touch scrolling in markdown preview
When the narrow diff viewer is showing a Markdown file in preview mode, touch gestures start on .markdown-preview-container/.markdown-body, which this predicate does not treat as scrollable code. Because this same change sets the mobile .after-pane to touch-action: none, the browser's native overflow scrolling is suppressed and the custom scrollApi path is never entered, leaving Markdown previews effectively unscrollable on touch devices.
Useful? React with 👍 / 👎.
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Summary: