[PR #3589] opentui: fix: Dialog button clicks leak through #10701

Closed
opened 2026-02-16 18:15:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3589

State: closed
Merged: Yes


When clicking a user message, the "Confirm Redo" dialog shows up. When clicking any of the buttons, the action is applied on the onMouseDown event, the dialog closes, and the corresponding onMouseUp event then gets triggered on the message element, causing the same dialog to be redisplayed. This PR fixes it by using the onMouseUp event in the dialog instead. Made the same change in DialogAlert to prevent the same issue there.

https://github.com/user-attachments/assets/26c524bd-ac3a-40f1-859c-bcbc2c869d6a

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3589 **State:** closed **Merged:** Yes --- When clicking a user message, the "Confirm Redo" dialog shows up. When clicking any of the buttons, the action is applied on the `onMouseDown` event, the dialog closes, and the corresponding `onMouseUp` event then gets triggered on the message element, causing the same dialog to be redisplayed. This PR fixes it by using the `onMouseUp` event in the dialog instead. Made the same change in `DialogAlert` to prevent the same issue there. https://github.com/user-attachments/assets/26c524bd-ac3a-40f1-859c-bcbc2c869d6a
yindo added the pull-request label 2026-02-16 18:15:26 -05:00
yindo closed this issue 2026-02-16 18:15:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10701