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
19.3k stars 2.96k forks source link

Modal close button gets focus and page scrolls to it after adding a repeater item inside the model form #14304

Closed kjjd84 closed 1 month ago

kjjd84 commented 1 month ago

Package

filament/filament

Package Version

3

Laravel Version

11

Livewire Version

No response

PHP Version

8

Problem description

When clicking any button inside of a repeater in a modal form, the modal close button is focused / scrolled to every single time.

It doesn't matter which button in the repeater is clicked - add, delete, whatever. This behaviour happens 100% of the time.

Expected behavior

Don't auto-scroll / focus the close button when clicking a button inside a repeater.

Steps to reproduce

Create an action with a modal form. Add some repeaters to it. Add a bunch of values to the repeaters so the scrollbar shows up. You'll see it jump every single time you click a button.

The close button also gets highlighted as well.

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

https://github.com/filamentphp/filament

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

github-actions[bot] commented 1 month ago

Hey @kjjd84! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.