Replies: 1 comment 1 reply
-
Hey @PhilipAnd! You absolutely can. The best way is to setup a listener and have your keybinding fire an event on the modal element. Should be something like this: <data-controller="modal" data-action="open->modal#open"> let event = new CustomEvent("open")
document.querySelector("[data-controller='modal']").dispatchEvent(event) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there a way to open the modal programmatically? I am building some keybinding functionality which should open an overlay, but I can't seem to see if there is a way to do it programmatically.
Beta Was this translation helpful? Give feedback.
All reactions