Skip to content

fix: overlay parent action modal reopening#19982

Merged
danharrin merged 6 commits into
filamentphp:4.xfrom
VernSG:fix-overlay-parent-action-modal-reopening
Jun 7, 2026
Merged

fix: overlay parent action modal reopening#19982
danharrin merged 6 commits into
filamentphp:4.xfrom
VernSG:fix-overlay-parent-action-modal-reopening

Conversation

@VernSG

@VernSG VernSG commented May 28, 2026

Copy link
Copy Markdown
Contributor

Change-Id: Ie412d8ad1f279c124de3fc83ef01d7aad4ec4c70

Description

Fixes #19561.

This prevents an action modal from briefly reopening when overlayParentActions() is used and nested modals are dismissed quickly.

When the child modal is closed, Livewire still needs to process the unmount request. If the parent modal is closed locally before that first request finishes, the next Livewire sync can still report the parent action as mounted and reopen the parent modal for a moment.

This keeps the optimistic UI behavior, but tracks action modal nesting indexes that have already been dismissed locally. When Livewire syncs back to an already-dismissed action index, the client skips reopening it.

Related to #19565. That PR also guarded against reopening dismissed modals, but reopening a child modal after closing it required two attempts. This version prunes dismissed child nesting indexes when Livewire syncs back to a parent action, so a child modal can still be reopened on the first attempt.

Visual changes

Recording with Chrome DevTools network throttling set to Slow 4G:

filament-modal-reopening-upload.mp4

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

Change-Id: Ie412d8ad1f279c124de3fc83ef01d7aad4ec4c70
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR!

In order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. If your fork belongs to a GitHub organization, please move the repository to your personal account and try again. If you're already using a personal fork, you can learn how to enable maintainer access in the GitHub documentation.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap May 28, 2026
@VernSG VernSG reopened this May 28, 2026
@github-project-automation github-project-automation Bot moved this from Done to Todo in Roadmap May 28, 2026
@danharrin danharrin added bug Something isn't working pending review labels May 29, 2026
@danharrin danharrin added this to the v4 milestone May 29, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Roadmap Jun 7, 2026
@danharrin danharrin merged commit 04211ec into filamentphp:4.x Jun 7, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Roadmap Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

overlayParentActions feature re-opens parent modal after close

2 participants