diff --git a/CHANGELOG.md b/CHANGELOG.md index bcd1232..f56e903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi --- +## [1.14.11] — 2026-07-09 + +### Fixed +- **Clicking a name inside a paragraph's text silently retargeted the assign popup to that paragraph** — misleading when you open "Assign to" on one (e.g. Unknown) paragraph, then click a name mentioned in a *different* paragraph just to reuse it: the popup would jump to and highlight that other paragraph instead of staying on the one you meant to fix. Now, while a popup is already open, clicking a name elsewhere only fills the search box — it no longer changes which paragraph gets assigned. Clicking a paragraph's own speaker label still always retargets it, as does clicking a name inside a paragraph when no popup is open yet. + +--- + ## [1.14.10] — 2026-07-09 ### Added diff --git a/VERSION b/VERSION index 9beda55..f350950 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.14.10 +1.14.11 diff --git a/static/index.html b/static/index.html index 28d24f2..9b6b493 100644 --- a/static/index.html +++ b/static/index.html @@ -10,7 +10,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -365,7 +365,7 @@ window.toggleNavTree = function(treeId, chevronId) { - + diff --git a/static/js/audiobook.js b/static/js/audiobook.js index 95cefab..debe97a 100644 --- a/static/js/audiobook.js +++ b/static/js/audiobook.js @@ -2798,8 +2798,24 @@ STRIKTE FORMAT- UND TEXTREGELN: if (txtEl && window.getSelection().isCollapsed) { const row = txtEl.closest('.ab-cv-row'); const nameHit = e.target.closest('.ab-name-hit'); + const clickedWord = nameHit ? (nameHit.dataset.name || nameHit.textContent.trim()) + : _abWordRangeAtPoint(e.clientX, e.clientY)?.word; + // If a popup is already open targeting a DIFFERENT paragraph, a click on + // a name elsewhere in the text only borrows that name into the search + // box — it must not silently retarget/highlight the paragraph under the + // cursor, which used to make it look like THAT paragraph was being + // reassigned instead of the one the user actually opened the popup for. + if (assignModeRow && assignModeRow !== row) { + if (clickedWord) { + const inp = assignPopup.querySelector('input'); + inp.value = clickedWord; + inp.dispatchEvent(new Event('input')); + inp.focus(); + } + return; + } if (nameHit) { - _abOpenAssignPopup(row, nameHit, nameHit.dataset.name || nameHit.textContent.trim()); + _abOpenAssignPopup(row, nameHit, clickedWord); } else { const hit = _abWordRangeAtPoint(e.clientX, e.clientY); if (hit) {