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
Support formaction and formmethod on <button> #1777
Conversation
Addresses #623 |
Closing this on account of not following the contribution guidelines, re: IE 11 support. I do appreciate you calling that out though, as I wouldn't have thought to look for it otherwise. |
You plan on addressing this? If not, please re open this and I'll update it for ie11 |
Sure! If you want to update for IE11 compatibility I'm happy to re-open it. |
I'm super jetlaged at the moment but will try to get to it before the weekend is up. |
bace9e5
to
5a5e207
Compare
@alexpetros Updated to use existing internals to support IE11. |
Yup, this looks great, thank you! Seems like a very straightforward thing to support. |
This PR is a little easier to merge than the linked change, unfortunately. The linked change would also support attributes changing after the |
following as I just discovered I was having issues figuring how to use the |
You should be good to go as soon as the 1.9.6 release is cut (very soon)! |
Bug: The these two forms should POST to the same URL but do not.
Fix: take into account formaction and formmethod of the submitter.
I'm not familiar with the HTMX codebase but
issueAjaxRequest
seemed like a reasonable place to handle this.event.submitter
is relatively new as well, so you might want a more backwards compatible implementation, but this shows the gist of the issue and the fix.Instead of using event.submitter, I have opted to use the tracked button click on the internal data. This should work on all browser targets supported by HTMX.