mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6577] [MERGED] fix(ui): prevent modal backdrop dismiss when text selection drag ends… #7233
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7233
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6577
Author: @menemorofaan
Created: 9/23/2026
Status: ✅ Merged
Merged: 9/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/backdrop-drag-dismiss📝 Commits (9)
d8d143cfix(ui): prevent modal backdrop dismiss when text selection drag ends outsideb0737bfMerge branch 'staging' into fix/backdrop-drag-dismiss3a1c29cfix(ui): require pointer-up on backdrop before dismissal in useBackdropDismiss439b0bestyle(ui): format use-backdrop-dismiss with prettier7818a3fMerge branch 'staging' into fix/backdrop-drag-dismissbbcde9afix(ui): hit-test release coordinates against backdrop surface in useBackdropDismissac9a16afix(ui): treat missing hit target as off-backdrop in useBackdropDismiss8343234Merge branch 'staging' into fix/backdrop-drag-dismiss590371eMerge branch 'staging' into fix/backdrop-drag-dismiss📊 Changes
8 files changed (+49 additions, -18 deletions)
View changed files
📝
packages/client/src/components/chat/ChatImageLightbox.tsx(+5 -6)📝
packages/client/src/components/chat/ConversationMessageShared.tsx(+3 -1)📝
packages/client/src/components/chat/EncounterModal.tsx(+5 -2)📝
packages/client/src/components/chat/MariPromptPreviewModal.tsx(+3 -1)📝
packages/client/src/components/chat/PeekPromptModal.tsx(+3 -1)📝
packages/client/src/components/chat/SummariesEditorModal.tsx(+3 -1)📝
packages/client/src/components/game/GameCharacterSheet.tsx(+3 -1)📝
packages/client/src/hooks/use-backdrop-dismiss.ts(+24 -5)📄 Description
Linked issue
Closes #6576
Why this change
Mouse interactions initiated inside modal windows (such as selecting text, clicking near borders, or mouse slips across controls) trigger accidental dialog dismissal if the mouse button is released outside over the backdrop. This interrupts workflow and causes loss of uncommitted edits or viewing context.
What changed
Integrated the existing
useBackdropDismisshook across affected modal, sheet, and lightbox containers. This ensures that backdrop dismissal only triggers when bothmousedownandmouseupoccur directly on the backdrop itself, safely ignoring drag-releases that originated inside the dialog.Affected components:
GameCharacterSheetChatImageLightboxConversationMessageShared(ConversationMessageLightbox)SummariesEditorModalEncounterModalMariPromptPreviewModalPeekPromptModalValidation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
GameCharacterSheet, initiated text selection drag inside the content, and released the cursor outside the dialog boundaries over the backdrop. Verified the sheet remains open and active.PeekPromptModal,MariPromptPreviewModal), encounter modal, summaries editor, and image lightboxes.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
N/A (interaction behavior fix)
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.