From b6f9af3f586970f2311bd76ce54a2fae85cffa1d Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Fri, 16 Oct 2026 21:58:05 -0400 Subject: [PATCH] fix(dialogs): Enter in Poll, Schedule, Report dialogs no longer discards input (#315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several dialogs are with the header ✕ (folds IconButton, no type attribute, so a submit button) as the form's first button. On implicit submission, Enter in a text field "clicked" ✕, closing the dialog and throwing away what was typed (a poll's question and answers, a schedule, a report reason). The header close/cancel IconButtons now have type="button": Create Poll, Schedule Message, Report User, Report Room, Account Data editor, State Event editor, device verification setup, and the message delete/report dialogs. Verified headless: in Create Poll, typing a question and pressing Enter used to close the dialog; now it stays open with the question kept. Fixes #315 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5 --- src/app/components/AccountDataEditor.tsx | 2 +- src/app/components/DeviceVerificationSetup.tsx | 4 ++-- .../developer-tools/StateEventEditor.tsx | 2 +- src/app/features/room/PollCreator.tsx | 2 +- src/app/features/room/ReportRoomModal.tsx | 2 +- src/app/features/room/ReportUserModal.tsx | 2 +- src/app/features/room/ScheduleMessageModal.tsx | 2 +- src/app/features/room/message/Message.tsx | 16 ++++++++++++++-- 8 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/app/components/AccountDataEditor.tsx b/src/app/components/AccountDataEditor.tsx index 5c3ac6e4c..bc83aa4a2 100644 --- a/src/app/components/AccountDataEditor.tsx +++ b/src/app/components/AccountDataEditor.tsx @@ -297,7 +297,7 @@ export function AccountDataEditor({ - + diff --git a/src/app/components/DeviceVerificationSetup.tsx b/src/app/components/DeviceVerificationSetup.tsx index d8f9f50ee..f2d7fd5ac 100644 --- a/src/app/components/DeviceVerificationSetup.tsx +++ b/src/app/components/DeviceVerificationSetup.tsx @@ -315,7 +315,7 @@ export const DeviceVerificationSetup = forwardRef - + @@ -361,7 +361,7 @@ export const DeviceVerificationReset = forwardRef - + diff --git a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx index 3aba5da02..0d89dfd0f 100644 --- a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx +++ b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx @@ -275,7 +275,7 @@ export function StateEventEditor({ type, stateKey, requestClose }: StateEventEdi - + diff --git a/src/app/features/room/PollCreator.tsx b/src/app/features/room/PollCreator.tsx index 9b5993948..dcd41da93 100644 --- a/src/app/features/room/PollCreator.tsx +++ b/src/app/features/room/PollCreator.tsx @@ -143,7 +143,7 @@ export function PollCreator({ roomId, threadRootId, onClose }: PollCreatorProps) Create Poll - + diff --git a/src/app/features/room/ReportRoomModal.tsx b/src/app/features/room/ReportRoomModal.tsx index 6c4b22712..68525390f 100644 --- a/src/app/features/room/ReportRoomModal.tsx +++ b/src/app/features/room/ReportRoomModal.tsx @@ -118,7 +118,7 @@ export function ReportRoomModal({ roomId, onClose }: ReportRoomModalProps) { Report Room - + diff --git a/src/app/features/room/ReportUserModal.tsx b/src/app/features/room/ReportUserModal.tsx index d7cccbe10..142310ad9 100644 --- a/src/app/features/room/ReportUserModal.tsx +++ b/src/app/features/room/ReportUserModal.tsx @@ -124,7 +124,7 @@ export function ReportUserModal({ userId, onClose }: ReportUserModalProps) { Report User - + diff --git a/src/app/features/room/ScheduleMessageModal.tsx b/src/app/features/room/ScheduleMessageModal.tsx index 144013e9a..0bdb872b8 100644 --- a/src/app/features/room/ScheduleMessageModal.tsx +++ b/src/app/features/room/ScheduleMessageModal.tsx @@ -202,7 +202,7 @@ export function ScheduleMessageModal({ {title} - + diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index ec7f52490..633745596 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -710,7 +710,13 @@ export const MessageDeleteItem = as< Delete Message - + @@ -850,7 +856,13 @@ export const MessageReportItem = as< Report Message - +