ba1f28ee53
The inline onclick on each typeahead dropdown item was:
onclick="onTypeaheadPick(event, 'cid', 'location', 'loc-id', ${JSON.stringify(m.name)})"
For any name with spaces/punctuation (i.e. every real location name like
"Area 1 - Loc 1 - 87 Jenks"), JSON.stringify emits double quotes around
the value, which collide with the onclick attribute's own double quotes
and terminate the attribute early. The dropdown rendered fine via
.innerHTML, but the browser's HTML parser saw a broken attribute and
never bound the click handler — clicks on dropdown items silently did
nothing.
Same pattern that broke the location Remove button yesterday. Same fix:
move args into data-* attributes and dispatch through a tiny trampoline
that reads from this.dataset. Robust against any character in
project/location names.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>