While thinking how to answer Over lay tables in tiddly wiki , I was trying to combine the EventCatcher
with drag-and-drop. And it doesn’t seem to be working.
This code properly catches a click event on a button and notifies the user:
\define my-actions()
<$action-sendmessage $message="tm-notify" $param="click-message" />
\end
<$eventcatcher selector="button" $click=<<my-actions>> >
<button text="alpha">alpha</button>
<button text="bravo">bravo</button>
<button text="charlie">charlie</button>
<button text="delta">delta</button>
<button text="echo">echo</button>
</$eventcatcher>
But this code does not notify the user when an item in a sortable list is dropped:
\define my-actions()
<$action-sendmessage $message="tm-notify" $param="drop-message" />
\end
!!! Drag to reorder
<$eventcatcher selector=".tc-droppable-placeholder" $drop=<<my-actions>> >
<<list-tagged-draggable tag:"MyTag" >>
</$eventcatcher>
Is this because of the selector, .tc-droppable-placeholder
? (I’ve also tried .tc-droppable
and .tc-dragover
, with the same behavior.) Is there something else subtly wrong with this? Or does the event catcher simply not handle drop events?
I vaguely remember seeing something about this recently and someone (perhaps @saq?) was working on it, but I’m really fuzzy on the details.
Download this and drag it to a wiki to see this in (in-)action: drop-event-catcher.json (1.9 KB)