diff --git a/app/javascript/controllers/dialog_controller.js b/app/javascript/controllers/dialog_controller.js index 44876b231..e9f8f990c 100644 --- a/app/javascript/controllers/dialog_controller.js +++ b/app/javascript/controllers/dialog_controller.js @@ -43,4 +43,11 @@ export default class extends Controller { closeOnClickOutside({ target }) { if (!this.element.contains(target)) this.close() } + + preventCloseOnMorphing(event) { + if (event.detail?.attributeName === "open") { + event.preventDefault() + event.stopPropagation() + } + } } diff --git a/app/views/collections/columns/update.turbo_stream.erb b/app/views/collections/columns/update.turbo_stream.erb index f6ccbe55b..5ab9915a0 100644 --- a/app/views/collections/columns/update.turbo_stream.erb +++ b/app/views/collections/columns/update.turbo_stream.erb @@ -1 +1 @@ -<%= turbo_stream.replace(dom_id(@column), partial: "collections/show/column", method: :morph, locals: { column: @column }) %> \ No newline at end of file +<%= turbo_stream.replace(dom_id(@column), partial: "collections/show/column", method: :morph, locals: { column: @column }) %> diff --git a/app/views/collections/show/menu/_column.html.erb b/app/views/collections/show/menu/_column.html.erb index 5ba6bde6a..0be3c12c4 100644 --- a/app/views/collections/show/menu/_column.html.erb +++ b/app/views/collections/show/menu/_column.html.erb @@ -1,4 +1,4 @@ -