Fixed
- The RichEditor integration now closes the Curator panel it opened, instead of whichever modal happens to come first on the page.
Curator closed its media panel by searching the whole document for the first .fi-modal and clicking that element's close control. Filament renders every mounted action modal as a sibling in stack order, so the first match is the outermost modal — not the panel the selection was made in.
On an ordinary page form the panel is the only modal on screen, so that lookup happened to be right and the bug stayed hidden. Nest the editor inside another modal — a Mason brick, a relation manager edit action, a RichContentCustomBlock — and inserting an image closed the host modal instead, discarding the unsaved form. In Mason's case the brick was silently never added.
Livewire dispatches from the component's own root element, so the insert event already identifies which panel sent it. Curator now walks up from there to its enclosing modal and closes that one by id, through Filament's own close-modal event.
Reported as awcodes/mason#53. Present since the RichEditor integration shipped in v4.0.0; this is not a regression of the context scoping added in v5.0.3, which addressed a different problem in the same handler.
Filament 4 users are covered — 5.x serves both majors.