Stop assign popup from retargeting when reusing a name from another paragraph (v1.14.11)

Clicking a name inside a paragraph's text always retargeted the "Assign
to" popup (and its highlight) to that paragraph, even when the popup was
already open for a different one. That made it look like the wrong
paragraph was being reassigned when the user just wanted to reuse a name
they saw elsewhere. Now, while a popup is open, clicking a name outside
its target paragraph only fills the search box.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-07-09 02:02:31 +02:00
parent f139367f74
commit 2133fe25c7
4 changed files with 28 additions and 5 deletions

View File

@ -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

View File

@ -1 +1 @@
1.14.10
1.14.11

View File

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

View File

@ -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) {