diff --git a/app/javascript/controllers/modal_controller.js b/app/javascript/controllers/modal_controller.js index e6df3a19..bf2ce753 100644 --- a/app/javascript/controllers/modal_controller.js +++ b/app/javascript/controllers/modal_controller.js @@ -3,7 +3,8 @@ import { Controller } from "@hotwired/stimulus" // Connects to data-controller="modal" export default class extends Controller { connect() { - this.element.showModal(); + if (this.element.open) return + else this.element.showModal() } // Hide the dialog when the user clicks outside of it diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb index 1cbac1ea..ac2ef743 100644 --- a/app/views/accounts/new.html.erb +++ b/app/views/accounts/new.html.erb @@ -1,11 +1,12 @@