themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.35k stars 711 forks source link

Drawer stopped working with Turbo Rails from v2.0.0 #697

Open WozniakMac opened 8 months ago

WozniakMac commented 8 months ago

Describe the bug When you navigate with turbo, drawer doesn't open anymore. It only makes screen grey. It was working fine in version before 2.0.0

To Reproduce Steps to reproduce the behavior: drawer Demo: https://github.com/WozniakMac/flowbite-issue-demo

Desktop (please complete the following information):

alkadoHs commented 8 months ago

That could be an issue with the id, and data-target attributes if there is multiple drawers with the same id that point to the same data-target attribute, Your drawer will not work properly. Consider debugging this issue to your browser console.

WozniakMac commented 8 months ago

Only one drawer and 2 modals. Each with unique id. It was working fine up to 2.0.0 https://github.com/WozniakMac/flowbite-issue-demo/blob/main/app/views/layouts/application.html.erb

Turbo is replacing the whole body on each get, so whatever changed in last update, now it is loosing connection to drawer body. (Maybe) Modal doesn't break like that for some reasons as you see on my gif