Fix short quoted-line drag opening Assign popup instead of Split (v1.13.3)

Any selection under 40 chars was treated as "assign this as a
character name," including short quoted lines like "»Henker«." that
the user clearly meant to split into their own Unknown-speaker
segment - guillemets/quotes are never part of a name. Selections
starting with a quote mark now skip the assign-popup hijack and fall
through to the already-visible "Split text to Unknown Speaker" button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-07-06 11:32:06 +02:00
parent 628bd75a82
commit cb76a2f237
4 changed files with 18 additions and 4 deletions

View File

@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
--- ---
## [1.13.3] — 2026-07-06
### Fixed
- **Dragging a short quoted line ("»Henker«.") to split it opened the Assign-to-character popup instead** — any selection under 40 characters was treated as "assign this text as a character name," even when it was clearly a short quoted line (guillemets/quotes are never part of a name). Selections starting with a quote mark now fall through to the "Split text to Unknown Speaker" button instead of being hijacked into the assign popup.
---
## [1.13.2] — 2026-07-06 ## [1.13.2] — 2026-07-06
### Fixed ### Fixed

View File

@ -1 +1 @@
1.13.2 1.13.3

View File

@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
<meta name="color-scheme" content="light dark"> <meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#2563EB"> <meta name="theme-color" content="#2563EB">
<meta name="app-version" content="1.13.2"> <meta name="app-version" content="1.13.3">
<link rel="manifest" href="/manifest.webmanifest"> <link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml"> <link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icon.svg"> <link rel="apple-touch-icon" href="/static/icon.svg">
@ -27,7 +27,7 @@
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── --> <!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css"> <link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/style.css?v=1.13.2"> <link rel="stylesheet" href="/static/style.css?v=1.13.3">
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── --> <!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
@ -365,7 +365,7 @@ window.toggleNavTree = function(treeId, chevronId) {
</script> </script>
<!-- loader.js: fetches sections → loads JS modules → removes skeleton --> <!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
<script src="/static/loader.js?v=1.13.2"></script> <script src="/static/loader.js?v=1.13.3"></script>
</body> </body>
</html> </html>

View File

@ -2800,6 +2800,13 @@ STRIKTE FORMAT- UND TEXTREGELN:
if (sel.isCollapsed || !feed.contains(sel.anchorNode)) return; if (sel.isCollapsed || !feed.contains(sel.anchorNode)) return;
const text = sel.toString().trim(); const text = sel.toString().trim();
if (!text || text.length >= 40 || text.includes('\n')) return; if (!text || text.length >= 40 || text.includes('\n')) return;
// A short selection is ambiguous — could be a name to assign, or a short
// quoted line ("»Henker«.") the user is dragging out to split into its
// own Unknown-speaker segment. Quote marks are a strong tell for the
// latter (names don't come wrapped in guillemets/quotes), so leave those
// alone for the "Split text to Unknown Speaker" button (wired via
// selectionchange below) instead of hijacking them into the assign popup.
if (/^[»„“"']/.test(text)) return;
_abJustHandledSelection = true; // stop the click that follows this mouseup from also firing _abJustHandledSelection = true; // stop the click that follows this mouseup from also firing
if (assignModeSeg) { if (assignModeSeg) {
// Popup already open (e.g. from clicking the speaker label) — a short // Popup already open (e.g. from clicking the speaker label) — a short