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.59k stars 2.75k forks source link

Modal Behavior Issue with Multiple Relations #13661

Open bzy107 opened 1 month ago

bzy107 commented 1 month ago

Package

filament/filament

Package Version

v3.2.95

Laravel Version

v11.16.0

Livewire Version

v3.5.4

PHP Version

v8.2.11

Problem description

When creating or editing relations in the edit screen with multiple relations, the modal does not close when clicking outside of it while focusing on a TextInput or Textarea. The focus remains on the TextInput or Textarea. This issue does not occur when there is only one relation.

click outside of modal: スクリーンショット 2024-07-22 19 03 32

You can verify this on the following demo pages: Single relation: https://demo.filamentphp.com/shop/orders/8/edit Multiple relations: https://demo.filamentphp.com/shop/customers/5/edit?activeRelationManager=1 I will investigate this issue if time permits, but for now, I am submitting this bug report.

Expected behavior

The modal should close when clicking outside of it.

Steps to reproduce

Login with credentials: test@test.com/testtest

  1. Access /admin/patient-seconds/1/edit
  2. Click the "new treatment" button
  3. Focus on the textarea or input field
  4. Click outside the modal

This will reproduce the issue where the modal does not close.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/bzy107/filament-select-bug

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

Hussam92 commented 1 month ago

What browser are you using? On what OS are you working? I tried it on Chrome and Firefox (Windows). I had no issues. Modal disappeared after clicking outside

bzy107 commented 1 month ago

I tested it on both Chrome and Firefox, and the result was the same. (In Safari, the functionality of the modal itself was broken.)

https://github.com/user-attachments/assets/840957b6-92a8-40f6-a2e1-b0ea6ec70396