square-analyst-94375
01/26/2023, 3:31 AMonload
around line 2882.bumpy-kangaroo-60192
01/26/2023, 6:01 AMadventurous-ocean-93733
01/26/2023, 6:29 AMenterKey
was recognised, Iโve used keyup[key=='Enter']
busy-action-85810
01/26/2023, 2:59 PMmysterious-toddler-20573
01/26/2023, 3:31 PMmysterious-toddler-20573
01/26/2023, 3:31 PMmysterious-toddler-20573
01/26/2023, 3:32 PMadventurous-ocean-93733
01/26/2023, 3:44 PMancient-shoe-86801
01/26/2023, 5:17 PMancient-shoe-86801
01/26/2023, 5:17 PMmysterious-toddler-20573
01/26/2023, 5:59 PMhundreds-cartoon-20446
01/26/2023, 6:27 PMearly-camera-41285
01/26/2023, 8:34 PMhx-trigger
to every input? I could do that, but I'm wondering if there is a way to do it on the <form/>
element instead.mysterious-toddler-20573
01/26/2023, 8:48 PMhx-trigger='input'
on the form should work, the event will bubble up to itblue-gold-89534
01/26/2023, 9:40 PMripe-action-67367
01/26/2023, 9:48 PMprehistoric-garden-45720
01/26/2023, 9:48 PMkeydown[key=='Enter'&&!shiftKey]
to trigger in a text area when Enter without the SHIFT key is pressed, so keyup[key=='Enter']
should work. I think enterKey
didn't work for me.astonishing-teacher-48635
01/27/2023, 12:58 AMhtmx.on('htmx:responseError', function(evt) {
is there a way to retry evt.detail.xhr inside this event?busy-action-85810
01/27/2023, 12:58 AM<span>
to trigger HTMX to load the <input>
which, once swapped, then listens for the Enter
keyup event. In case it helps, here's the source code (using ERB) to first render the "task" partial:
https://github.com/bkuhlmann/hemo/blob/main/slices/main/templates/tasks/_task.html.erb#L10
...and here is "edit" template what is swapped in which then listens for the Enter
keyup event:
https://github.com/bkuhlmann/hemo/blob/main/slices/main/templates/tasks/edit.html.erb#L20-L26mysterious-toddler-20573
01/27/2023, 3:23 AMbrainy-zoo-88281
01/27/2023, 9:14 PMgentle-salesclerk-37089
01/27/2023, 9:43 PMgentle-salesclerk-37089
01/27/2023, 9:43 PMbig-airline-13935
01/28/2023, 2:29 AMmysterious-toddler-20573
01/28/2023, 3:12 AMrefined-pillow-25368
01/28/2023, 12:52 PMbland-coat-6833
01/28/2023, 1:59 PMdelay
modifier on hx-trigger
refined-pillow-25368
01/28/2023, 2:13 PMrefined-pillow-25368
01/28/2023, 2:16 PMrefined-pillow-25368
01/28/2023, 2:16 PM