Repository navigation
fix(Drawer): cover existing service drawers with dialog backdrops - #8865
Conversation
Reviewer's GuideImplementationChange service drawer overlays to stay with the modal host active when they are created, while retaining active-modal following by default for other overlays.
UIAdd a localized drawer example that opens a dialog from the service drawer to demonstrate the corrected backdrop behavior.
ConfigurationBump the BootstrapBlazor package version to beta07 alongside the overlay fix.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Linked issuesChecked at commit 3692c94 #8864 bug(Drawer): dialog backdrop does not cover an existing service drawer · 2 of 2 met
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/BootstrapBlazor/wwwroot/modules/fullscreen.js" line_range="119-122" />
<code_context>
+export function attachOverlay(el, { followModal = true } = {}) {
const placeholder = document.createComment('fullscreen-overlay')
el.before(placeholder)
+ let ownerHost = followModal ? null : getActiveModalHost()
const move = parent => {
</code_context>
<issue_to_address>
**Open drawers leave their modal**
When a drawer stays open while its modal closes, reopens, or another modal opens, `ownerHost` remains null or is cleared, and `followModal: false` makes `update` select no active host. The drawer moves to its placeholder instead of sharing the active modal’s stacking and interaction behavior, leaving it covered or inaccessible.
For a non-following drawer, select the active modal host when `ownerHost` is null or no longer valid, and retain that host as the drawer’s owner.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: src/BootstrapBlazor/wwwroot/modules/fullscreen.js:122
| let ownerHost = followModal ? null : getActiveModalHost() | ||
|
|
||
| const move = parent => { | ||
| const focused = document.activeElement |
There was a problem hiding this comment.
🟠 High · Open drawers leave their modal
When a drawer stays open while its modal closes, reopens, or another modal opens, ownerHost remains null or is cleared, and followModal: false makes update select no active host. The drawer moves to its placeholder instead of sharing the active modal’s stacking and interaction behavior, leaving it covered or inaccessible.
For a non-following drawer, select the active modal host when ownerHost is null or no longer valid, and retain that host as the drawer’s owner.
Prompt for AI agents
In `src/BootstrapBlazor/wwwroot/modules/fullscreen.js` at lines 119-153:
**Open drawers leave their modal**
When a drawer stays open while its modal closes, reopens, or another modal opens, `ownerHost` remains null or is cleared, and `followModal: false` makes `update` select no active host. The drawer moves to its placeholder instead of sharing the active modal’s stacking and interaction behavior, leaving it covered or inaccessible.
For a non-following drawer, select the active modal host when `ownerHost` is null or no longer valid, and retain that host as the drawer’s owner.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8865 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 664 664
Lines 30484 30484
=========================================
Hits 30484 30484
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Link issues
fixes #8864
Summary By Copilot
/drawerexample that opens a dialog from a service drawer.11.1.2-beta06to11.1.2-beta07.Regression?
The exact version introducing this behavior was not confirmed.
Risk
The shared overlay helper gains an opt-out from following newer modal hosts. Only service drawers use this option; Message and Toast retain the default behavior.
Verification
Manual (required)
Automated
Browser verification on
/drawer: opening a dialog from the service drawer darkens the drawer; closing the dialog restores drawer interaction. Also checked fullscreen and opening a drawer while a dialog is already open.dotnet build src\BootstrapBlazor --no-restore --nologo -v quiet— passed, 0 warnings and 0 errors during implementation.dotnet build src\BootstrapBlazor.Server --configuration Release --no-restore --nologo -v quiet— passed against the final committed branch, 0 warnings and 0 errors.dotnet build src\BootstrapBlazor.Server --no-restore --nologo -v quiet— failed on the publication rerun because an already runningBootstrapBlazor.Serverprocess locked the Debug output. The running process was left untouched; Release validation passed.git diff --check d83a35e39bd713a1cc6fc2799b0242538dfa39d2...HEAD— passed.No unit tests or JavaScript tests were added or run, following repository policy. Automated verification above means build and whitespace checks.
The right-hand drawer is dimmed beneath the centered dialog:
Packaging changes reviewed?
Only the package version changes from
11.1.2-beta06to11.1.2-beta07; no package was produced.☑️ Self Check before Merge
The branch includes the latest fetched
maincommit,d83a35e39bd713a1cc6fc2799b0242538dfa39d2.Summary by Sourcery
Ensure service drawers remain correctly covered when dialogs open while preserving existing overlay behavior for other components.
New Features:
Bug Fixes:
Enhancements:
Build: