Repository navigation
TConfirmSubmit: confirm the actions of the controls inside it (#1401) - #1502
Merged
Merged
Conversation
8 tasks done
belisoful
marked this pull request as draft
November 8, 2026 23:08
belisoful
marked this pull request as ready for review
November 9, 2026 03:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1401. Follows #1493.
TConfirmSubmitwraps controls and asks for confirmation in a modalalertdialogbefore they act. It covers whatTConfirmButtoncannot, and it needs script: without it, the controls act with no confirmation.The client control stops the event in a capture listener on the wrapper, and OK sends it again, so validation, postbacks, callbacks, and navigation run through the control's own handlers. This replaces the form
submitinterception discussed on the issue: it needs no hook inPrado.PostBackor the callback request, and active controls need no special case. A cancelled click leaves a checkbox as it was, with no undo step.The server passes the client IDs of the visible AutoPostBack descendants, so a plain checkbox or text box in the wrapper does not ask.
TConfirmDialogTraitnow holds the dialog properties and rendering, shared withTConfirmButton.TConfirmButtonoutput is unchanged.Enter in an AutoPostBack text box needed a fix: it opened the dialog during
keydown, and the rest of the key press activated the focused Cancel button. The wrapper cancels the key's default action for those fields.Tests:
TConfirmSubmitTestunit tests;confirmsubmit.test.js(vitest);ConfirmSubmitTestCasecovers a link button, submit and image buttons, Esc with focus return, an AutoPostBack checkbox, list, and text box with Enter, what does not ask, a callback, validation, and a hyperlink in Chromium, Firefox, and WebKit (repeated 2x without a flake). Image button coordinates after OK are not checked end to end.