Don't try to orient column menus

This commit is contained in:
Adrien Maston
2026-03-04 11:30:42 +01:00
parent fc95ddca05
commit 9c26e834b7
2 changed files with 6 additions and 3 deletions
@@ -7,7 +7,8 @@ export default class extends Controller {
static values = {
modal: { type: Boolean, default: false },
sizing: { type: Boolean, default: true },
autoOpen: { type: Boolean, default: false }
autoOpen: { type: Boolean, default: false },
orient: { type: Boolean, default: true }
}
connect() {
@@ -26,7 +27,9 @@ export default class extends Controller {
this.dialogTarget.showModal()
} else {
this.dialogTarget.show()
orient({ target: this.dialogTarget, anchor: this.element })
if (this.orientValue) {
orient({ target: this.dialogTarget, anchor: this.element })
}
}
this.loadLazyFrames()
+1 -1
View File
@@ -1,4 +1,4 @@
<div id="<%= dom_id(column, :menu) %>" class="cards__menu" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
<div id="<%= dom_id(column, :menu) %>" class="cards__menu" data-controller="dialog" data-dialog-orient-value="false" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
<button class="btn btn--circle txt-x-small borderless" data-action="click->dialog#open">
<%= icon_tag "menu-dots-horizontal", class: "translucent" %>
<span class="for-screen-reader">Column options</span>