We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that the event object is not passed to the jx-vals expression when using a delay modifier in hx-trigger (see code below).
<div contenteditable="true" hx-post="/test" contenteditable="true" hx-trigger="input delay:1s" hx-vals="js:{text: convertEvent(event)}" >doesn't work</div> <div contenteditable="true" hx-post="/test" contenteditable="true" hx-trigger="input" hx-vals="js:{text: convertEvent(event)}" >works</div> window.convertEvent= function(event) { console.log(event) return event.target.innerHTML }
The text was updated successfully, but these errors were encountered:
I have also noticed this problem
Sorry, something went wrong.
any update on this issue ? any work around ?
Workaround:
<div contenteditable="true" hx-post="/test" contenteditable="true" hx-trigger="myinput" hx-vals="js:{text: convertEvent(event)}" oninput="setTimeout(evt => htmx.trigger(evt.target, 'myinput', {cause: evt}), 1000, event)" ></div>
Successfully merging a pull request may close this issue.
It seems that the event object is not passed to the jx-vals expression when using a delay modifier in hx-trigger (see code below).
The text was updated successfully, but these errors were encountered: