Skip to content

fix: restore horizontal scrolling in narrow diff view#800

Merged
matt2e merged 2 commits into
mainfrom
diff-horizontal-scroll
Jun 18, 2026
Merged

fix: restore horizontal scrolling in narrow diff view#800
matt2e merged 2 commits into
mainfrom
diff-horizontal-scroll

Conversation

@matt2e

@matt2e matt2e commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Expose horizontal scroll controls through DiffViewer's scroll API.
  • Route narrow diff horizontal gestures over code to content scrolling instead of pane dragging.
  • Keep pane reveal drag limited to the spine/edge hit area.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners June 18, 2026 06:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +1035 to +1038
function isMobileDiffCodeTarget(target: HTMLElement): boolean {
return !!target.closest(
'.after-pane .code-container, .after-pane .lines-wrapper, .after-pane .line'
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@matt2e matt2e merged commit 8571cc9 into main Jun 18, 2026
6 checks passed
@matt2e matt2e deleted the diff-horizontal-scroll branch June 18, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant