-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Description
On Linux, navigator.maxTouchPoints > 0 can be true on desktop machines with a touchscreen. isMobile() interprets this as mobile, halving the SplatPager page pool (256 → 128 pages). The existing Windows guard correctly handles this case for Windows touch devices — the same guard should cover Linux, since Linux is always a desktop OS regardless of touch capability.
export function isMobile(): boolean {
const platform = navigator.platform.toLowerCase();
if (platform.startsWith("win") || platform.startsWith("linux")) {
return false;
}
if (navigator.maxTouchPoints > 0) {
// Touch-enabled device, assume it's mobile
return true;
}
return /Mobi|Android|iPhone|iPad|iPod|Opera Mini|IEMobile/.test(
navigator.userAgent,
);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels