From cc1ec1653f6e510638c2155e710f6062a34a2aaa Mon Sep 17 00:00:00 2001 From: Honey Date: Fri, 7 Aug 2026 17:40:18 +0200 Subject: [PATCH] fix(ui): stop accidental text-selection of UI chrome when dragging near controls Dragging the mouse near a field edge (Global Suche, the importer, etc.) started a text selection of the surrounding page titles/labels instead of feeling like an app. Disable user-select on the #app shell; re-enable it for real text fields (input/textarea/contenteditable) and copyable content (lyrics). Setup screen is outside #app and unaffected. SW cache -> ns-v66. Co-Authored-By: Claude Opus 4.8 --- public/sw.js | 2 +- styles.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index a556346..0c9f5ba 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,4 +1,4 @@ -const CACHE = 'ns-v65'; +const CACHE = 'ns-v66'; const PRECACHE = ['/', 'index.html', 'manifest.json', 'icon.svg']; const SKIP_PATHS = ['/rest/stream', '/rest/download', '/config.js']; // Auth token params stripped from cache keys so artwork survives across sessions/token refreshes. diff --git a/styles.css b/styles.css index 50dfe6a..afd1da4 100644 --- a/styles.css +++ b/styles.css @@ -14,6 +14,11 @@ } *,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent} *:focus{outline:none} +/* App-like feel: dragging near controls must not accidentally select UI chrome + (page titles, labels, buttons). Real text fields and copyable content opt back in. */ +#app{-webkit-user-select:none;user-select:none} +#app input,#app textarea,#app [contenteditable=true],#app .selectable, +#app #np-lyrics-content,#app .lyrics-line,#app .lyrics-plain{-webkit-user-select:text;user-select:text} html,body{height:100%;font-family:var(--font);background:var(--bg);color:var(--text);overflow:hidden} ::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--surface2);border-radius:2px}