filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.03k stars 2.69k forks source link

MarkdownEditor has no content when opened in a modal #10926

Closed fabio-ivona closed 7 months ago

fabio-ivona commented 7 months ago

Package

filament/forms

Package Version

v3.3.2

Laravel Version

v10.41.0

Livewire Version

v3.3.5

PHP Version

PHP 8.3.0

Problem description

This seems somehow similar to https://github.com/filamentphp/filament/issues/5972 but slightly different

Content of markdown editor is not shown when it gets loaded in a modal. It reappears when you focus the field.

this happens only if the modal is opened from a page that contains a markdown editor itself

Expected behavior

Markdown content rendered.

Steps to reproduce

Starting from the reproduction repository code:

  1. composer install
  2. php artisan migrate --seed --fresh
  3. php artisan serve
  4. visit http://127.0.0.1:8000/admin
  5. login with default credentials
  6. open Cars resource → edit "test car"
  7. in "Parts" relation, edit "test part"
  8. "description" markdown editor field is empty
  9. click on it in order to get focus
  10. the "this text should be visible" content appears

Reproduction repository

https://github.com/fabio-ivona/filament-markdown-issue-reproduction

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

andrewdwallo commented 7 months ago

I found the fix. I will make a PR here shortly.