mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user