fix(native): a long press in the app selects no text and opens no callout

In the iOS and Android app a long press on a label, card or image started a text
selection, the magnifier or a "save image" menu, the clearest sign of a web page
in a frame. startNativeApp marks <html> with data-native-app, and index.css then
turns selection and the callout off for the UI. Inputs, textareas, selects and
editors stay selectable so typing, pasting and the caret work; text worth copying
opts in with .trek-selectable. A browser keeps its default.
This commit is contained in:
Maurice
2026-11-09 08:32:24 +01:00
parent fede671f3b
commit d9baaa8957
3 changed files with 31 additions and 0 deletions
+4
View File
@@ -25,6 +25,10 @@ const OFFLINE_SHELL_DELAY_MS = 15_000;
export function startNativeApp(): void {
if (!isNativeApp()) return;
// Marks the app for index.css: no text selection or long-press callout on the
// UI itself, as in any native app. Fields stay selectable there.
document.documentElement.setAttribute('data-native-app', '');
followThemeInStatusBar();
// What this binary can do, and whether this server's UI needs a newer one.