Skip to content

FIX: [2.x] choose target modal stacks backdrops and does not close after selecting a target - #64

Merged
jacquesbh merged 2 commits into
monsieurbiz:2.xfrom
crydotsnake:fix/choose-target-modal-stacks-backdrops-and-does-not-close-after-selecting-a-target
Aug 17, 2026
Merged

jacquesbh merged 2 commits into
monsieurbiz:2.xfrom
crydotsnake:fix/choose-target-modal-stacks-backdrops-and-does-not-close-after-selecting-a-target

Conversation

@crydotsnake

Copy link
Copy Markdown
Contributor

Fixes: #63

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Sylius 2.x admin “modal portal” behavior that causes the menu “choose target” browser modal to leave orphaned modals/backdrops behind (darkening the UI over time) and sometimes prevents the modal from closing after selecting a target.

Changes:

  • Added a monsieurbizSyliusMenuBrowserDestroyModal(locale) helper to dispose/remove previously created modals (even if portaled to <body>) and clean up global modal UI state.
  • Updated the modal loading flow to always destroy any prior modal before rendering/showing the next one, and to simplify the non-200 response path.
  • Updated a doc comment to better describe selecting an item for a provider.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Resources/views/admin/browser/app.html.twig Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@crydotsnake
crydotsnake requested a review from jacquesbh August 3, 2026 09:57
@jacquesbh
jacquesbh merged commit bbf09a4 into monsieurbiz:2.x Aug 17, 2026
6 of 8 checks passed
@jacquesbh

Copy link
Copy Markdown
Member

Thank you @crydotsnake !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: [2.x] Choose target modal stacks backdrops and does not close after selecting a target

4 participants