flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Drawer stopped working with Turbo Rails from v2.0.0

Open WozniakMac opened this issue 2 years ago • 2 comments

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):

  • OS: MacOS
  • Browser Chrome
  • Version 118.0.5993.117

WozniakMac avatar Oct 30 '23 15:10 WozniakMac

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.

alkadoHs avatar Oct 31 '23 05:10 alkadoHs

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

WozniakMac avatar Oct 31 '23 06:10 WozniakMac