Hi folks,
I’m trying to implement a keyboard shortcut that will let me close a modal that I’ve opened.
I’ve got a “close action” tiddler that’s like this:
<$action-sendmessage $message="tm-close-tiddler" $param="$:/phajas/spaces/modal"/>
that’s tagged with $:/tags/KeyboardShortcut
and has a key
that’s cmd-0
. I can see it being called if I add an action-log
below the action-sendmessage
, so I know that the key combo is being detected.
I can open $:/phajas/spaces/modal
in a modal, but hitting cmd-0 will not close the modal. If I put the action-sendmessage
in a button inside $:/phajas/spaces/modal
, it works.
I must be doing something wrong. How can I close a modal with action-sendmessage
from a keyboard shortcut?