Repository navigation
Close a dialog only on a press of its scrim - #1932
Merged
Merged
Conversation
A text selection begun in a field and let go over the backdrop arrives as a click on the backdrop, and every dialog but the feedback one closed on it, throwing away the name, code or share it held. Every backdrop now spreads useScrimDismiss, so only a press that starts and ends on the scrim closes it; Escape and the close buttons are unchanged.
BarganConstantin
force-pushed
the
fix/dialog-backdrops
branch
from
October 4, 2026 20:49
5a837d6 to
86a6da3
Compare
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.
What changes
useScrimDismisshelper the feedback dialog got in Feedback dialog: keep the draft on a stray release, lock it while sending, and cancel on close #1925. Before this, a text selection begun in a field and let go past the dialog's edge arrived as a click on the backdrop and closed the dialog, throwing away what it held — a name typed into "This deck on the network", a share half pasted into Add account, the share Share accounts had just made. The 22 other backdrops (including the "did not load" dialog from Fix stale dialog chunks, fast-mode pricing in Projects, the offline tab icon, the phone topbar and two re-sign-in prompt cases #1929) spread the helper's handlers in place ofonClick. Escape, the × and every close button are unchanged.onClick={…}on a backdrop are repointed to the new spread, and two test mocks ofuse-modal-dismissnow keep the realuseScrimDismiss.Verification
npm run typecheckclean.--maxWorkers=3 --minWorkers=1).src/web/__tests__/dialog-scrim-dismiss.test.ts:modal-backdropin the client: none has anonClick, each spreads a value made byuseScrimDismiss(…). It failed before the change.