-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
Cancel events from form associated buttons. #3070
Cancel events from form associated buttons. #3070
Conversation
* Clarify event filter uses in hx-trigger * Change hx-trigger event filter example to avoid ambiguity input is both a tag and an event. * Document the scope difference between standard selector and event filter from:input listens to the page and click[event.target.matches('input')] listens to the element. * Document that event filters as an alternative to CSS selectors require eval * Move note about eval to standard event filters section. * Simplify the referenced to standard event filters in the standard event modifiers section, and link to the standard event filters section instead. * End quote in the correct place in standard event modifier doc. * Correct language on how event filters from:body receive events. * hx-trigger filter example catches click events specifically.
Add htmx4s to scala examples
Doc: Fix typo in URL to prevent broken link redirect
* Added htmx contact app using Blazor SSR * add back whitespace
…nges it to 2.0.3 as it should be (#2980) Fix "Download a copy" link to point to current 2.0.3
`evt` is not the correct variable name here - it should be `e`.
* add htmgo * move
Add links to two Julia projects by Lee Phillips.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test change proposal...
var button = byId('b1') | ||
htmx._('shouldCancel')({ type: 'click' }, button).should.equal(true) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you put an hx-get on the form this could be an end to end test, rather than needing to reach into the internals of htmx. Does that sound reasonable to you?
This fixes an issues in which `bodyContains()` would incorrectly return false for nested shadow roots.
…node (#2976) * Do not execute hx-trigger="load" on re-initialization of an existing node * simplify initNode firstInit logic
Co-authored-by: shartley <[email protected]>
…and hx-disabled-elt (#2902) * Initial suggestion (squashed) Support multiple extended selectors for hx-include Additional test for nested standard selector Add @MichaelWest22 hx-disabled-elt multiple selector test Add hx-trigger `from` test with multiple extended selectors Simplify Include #2915 fix Update htmx.js Split for readability Don't apply global to previous selectors Rewrite loop, restore global recursive call, minimize diff Use break for better readability Co-Authored-By: MichaelWest22 <[email protected]> * Keep global as a first-position-only keyword * Wrapped selector syntax * Replace substring check by individual chars check * Fix format --------- Co-authored-by: MichaelWest22 <[email protected]>
…htmx into cancel-form-buttons
I kept mucking up the commits, but I think the final, clean PR is here now: #3072 |
Description
Please describe what changes you made, and why you feel they are necessary. Make sure to include
code examples, where applicable.
HTMX wasn't cancelling vanilla form submission from buttons outside of a form.
Corresponding issue: #2919 can probably be closed with this?
Testing
Please explain how you tested this change manually, and, if applicable, what new tests you added. If
you're making a change to just the website, you can omit this section.
Added a test in
test/core/internals.js
Checklist
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded