fix(suggestions): make ambiguous-character picker buttons clickable

The chip sets pointer-events:none while accept is in flight to prevent
double-clicks. When the server returns 409 ambiguous and the picker is
appended as a child of the chip, the picker's buttons inherit the
disabled pointer events and silently refuse clicks.

Set pointer-events:auto on the picker container so its children can
receive clicks regardless of the parent chip's state. Picker buttons
already manage their own disabled state during the second-stage POST,
so re-enabling the whole picker is safe.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 10:56:19 -04:00
parent 09b6146656
commit 4cf77aac83
+5
View File
@@ -393,6 +393,11 @@ document.addEventListener('DOMContentLoaded', () => {
function renderAmbiguousPicker(chip, candidates, ctx) { function renderAmbiguousPicker(chip, candidates, ctx) {
const picker = document.createElement('div'); const picker = document.createElement('div');
picker.className = 'suggestion-ambiguous-picker'; picker.className = 'suggestion-ambiguous-picker';
// The chip has pointer-events:none set above (so the user can't click
// it again while the accept is in flight). The picker is its child, so
// it inherits that and its buttons can't receive clicks. Re-enable on
// the picker — picker buttons manage their own disabled state.
picker.style.pointerEvents = 'auto';
const label = document.createElement('div'); const label = document.createElement('div');
label.className = 'ambiguous-label'; label.className = 'ambiguous-label';