Closed ashwin47 closed 6 months ago
I faced the same error and notice it also happens when you navigate to another page and click the browser back button to return. If you use a link to reach the page again it works.
I installed tailwindcss-stimulus-components with importmaps (Rails 7).
Reproduction steps:
rails new modal_stimulus --css tailwind --skip-action-mailbox --skip-jbuilder -a propshaft -j esbuild
generate some scaffold
rails generate scaffold post title:string body:text
then add to yarn
yarn add tailwindcss-stimulus-components
Now follow docs for modal
goto /app/javascript/controllers/index.js and add
Then add to any view
Now open browser and go to correct route to find the "Open Modal" button. it may open on the first try but not if you refresh the page.
Console gives "Uncaught (in promise) DOMException: The user aborted a request."