Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions packages/diffs/src/components/CodeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,21 +476,7 @@ interface SpringStepResult {
}

// A vibe slopped heuristic to detect mobile safari only
const MOBILE_SAFARI = (() => {
const { navigator } = globalThis;

const userAgent = navigator.userAgent;
const isIOS = /iP(?:hone|ad|od)/.test(userAgent);
const isIPadOS =
navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;

return (
(isIOS || isIPadOS) &&
/AppleWebKit/.test(userAgent) &&
/Safari/.test(userAgent) &&
!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(userAgent)
);
})();
const MOBILE_SAFARI = false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the Mobile Safari detection guard

On iPhone/iPad Safari this constant now stays false, so suspendScrollInteractions() never sets --diffs-overflow-override to hidden during scroll. The surrounding code documents this as the crash/reload mitigation for aggressive scrolling with horizontally scrollable code wrappers, and CodeView.pointerEvents.test.ts has a mobile Safari case that expects the override to be applied, so this reintroduces the production Safari crash path for that browser family.

Useful? React with 👍 / 👎.


type PendingAlignTypes = Exclude<CodeViewLineScrollTarget['align'], 'nearest'>;

Expand Down
Loading