mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-11 12:18:59 +00:00
The delete affordance next to each pending portal in the channel-create form was wired to onClick, but Radix Select closes the popover on the SelectItem's own pointerdown handler. By the time the click event would fire on the nested button, the popover — and the button — are gone. onPointerDown on the button additionally called e.preventDefault(), which further blocked the browser from synthesising the click at all. Result: clicking the trash icon looked completely dead. Keyboard users were already covered by the Delete/Backspace onKeyDown handler on the SelectItem itself; only mouse users were locked out. Fire setPendingDeleteName from onPointerDown (with stopPropagation + preventDefault so the parent SelectItem doesn't also select the pending portal), and keep the onClick handler so the button stays activatable by Enter/Space when it takes focus. This mirrors the pattern Radix uses for its own nested interactive elements (e.g. DropdownMenu.CheckboxItem). Surface parity: - Gateway server: N/A because the change is UI-only. - API contract: N/A because bitrix.portals.delete already exists. - Web UI: the single component that owned the broken handler. - CLI/runtime: N/A because no CLI reads this UI state. Co-authored-by: DangTinh311 <dangtinh31193@gmail.com>