I would like the input box be focused while doing inline validation with keyup trigger.
For example:
<input
class="input is-danger"
name="name"
type="text"
value="Invalid value"
hx-trigger="keyup changed delay:300ms"
hx-target="this"
hx-swap="outerHTML"
hx-post="/validate"
hx-params="name">
This works and the dom gets swapped if the user has not entered anything in 300ms. But once its swapped the input focus is lost, so the user cant keep editing to correct the mistake.
I've tried using the event system, but it seems like some of the event listeners are not getting registered.
htmx.on("afterSettle.htmx", function(e) {
console.log("This did not print");
});
However load.htmx did work.
I would like the input box be focused while doing inline validation with keyup trigger.
For example:
This works and the dom gets swapped if the user has not entered anything in 300ms. But once its swapped the input focus is lost, so the user cant keep editing to correct the mistake.
I've tried using the event system, but it seems like some of the event listeners are not getting registered.
However
load.htmxdid work.