fix(webui): treat iPad and hybrid pointers as touch chrome

A mouse on iPad is still a coarse pointer. Use the sheet layout,
show the custom cursor only after a real mouse move, and keep
theme and wallpaper changes from hanging the page.
This commit is contained in:
DrSmoothl committed 2026-09-19 16:30:11 +08:00
1 parent 0ef9f9475c
commit b60b1a419c
12 files changed
+98 -59

No files matched your search

@@ -13,6 +13,7 @@ import {
} from 'lucide-react';
import { ContextMenuSurface } from '@/components/interior/context-menu';
import { useTheme } from '@/contexts/ThemeContext';
import { FINE_POINTER_QUERY } from '@/lib/utils';
type TextEditor = HTMLInputElement | HTMLTextAreaElement | HTMLElement;
@@ -326,7 +327,7 @@ export function GlobalContextMenu() {
if (!enabled) return;
const onContextMenu = (event: MouseEvent) => {
if (event.shiftKey || !window.matchMedia('(hover: hover) and (pointer: fine)').matches) return;
if (event.shiftKey || !window.matchMedia(FINE_POINTER_QUERY).matches) return;
if (!(event.target instanceof Element)) return;
if (event.target.closest('[data-context-menu="native"]')) return;
if (event.target.closest('.global-context-menu')) {