Alpine headless UI with Rails #3087
-
Hi, I am trying to use Alpine headless UI with Rails 7 and I couldn't run headless UI.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I made the following changes to the application.js file and I could run it now but firefox and chromium browsers show different issues at the console. I can open and close the Modal at Firefox but with Chromium, once I open and close it, I can't reopen it. import "@hotwired/turbo-rails" import ui from "@alpinejs/ui" Alpine.plugin(ui) document.addEventListener("DOMContentLoaded", function(event) { System details$ cat /etc/issue Firefox screenshotChromium screenshot |
Beta Was this translation helpful? Give feedback.
I made the following changes to the application.js file and I could run it now but firefox and chromium browsers show different issues at the console.
I can open and close the Modal at Firefox but with Chromium, once I open and close it, I can't reopen it.
import "@hotwired/turbo-rails"
import "controllers"
import ui from "@alpinejs/ui"
import focus from "@alpinejs/focus"
import Alpine from "alpinejs"
window.Alpine = Alpine
Alpine.plugin(ui)
Alpine.plugin(focus)
document.addEventListener("DOMContentLoaded", function(event) {
window.Alpine.start();
});
System details
$ cat /etc/issue
Ubuntu 20.04.4 LTS \n \l
Firefox screenshot
Chromium screenshot