Skip to content

Conversation

@MichaelWest22
Copy link
Collaborator

@MichaelWest22 MichaelWest22 commented Jul 8, 2025

Description

Another issue found with the change introduced in #3336 where a button inside a form that is htmx enabled and it has a element inside, when this inner element is clicked it does not prevent the button from submitting the form. We now use the target of the click event to find the element we need to check if it needs canceling and we already fixed this same issue with links containing inner elements but buttons can have the same issue it seems. Finding the closest button/input[type=submit] parent of the clicked target should always find the real button to check for preventing default action.

Corresponding issue:
#3366

Testing

Added a regression test for this issue and ran test suite

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@MichaelWest22 MichaelWest22 added ready for review Issues that are ready to be considered for merging bug Something isn't working labels Jul 11, 2025
@1cg 1cg merged commit 28fae54 into bigskysoftware:dev Jul 14, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Issues that are ready to be considered for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants