Rollback Fix Modified click trigger on form elements prevent default behaviour #3369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a possible rollback of the fix we put in to handle modified click triggers on form elements preventing default behaviour. It has caused a couple of regressions when links and buttons have elements contained inside them so we may want to consider rolling back this change instead of fixing and retaining this fix in place.
Created this PR so we can compare it with the other PR #3368 and decide which one is the best way forward to resolve the issue. We can close the other PR as we only need one of these merged to resolve the issue.
There is one additional sub bug I found in the last fix up that this will roll back and i've disabled the regression test for this one
a htmx enabled button clicked inside a link will prevent the link from navigating on click
which is a edge case that was not handled before where a htmx enabled button clicked inside a link would fire the link full page navigation but this is very edge case.Corresponding issue:
#3366
Testing
Rolled back tests but retained some of the regression tests added. Also left a couple of disabled tests for the fixes this will roll back.
Checklist
master
for website changes,dev
forsource changes)
approved via an issue
npm run test
) and verified that it succeeded