Skip to content
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

btnSubmit fails detection after html minification #229

Open
markmono opened this issue Jul 6, 2023 · 0 comments
Open

btnSubmit fails detection after html minification #229

markmono opened this issue Jul 6, 2023 · 0 comments
Assignees
Labels
Q&A Questions and answers

Comments

@markmono
Copy link
Contributor

markmono commented Jul 6, 2023

After playing around with minifying my html, I came across an issue where the submit button detection no longer works due to type="submit" being removed from buttons.

My approach was changing the selector being used to detect the submit button

let btnSubmit = form.querySelector('button:not([type="button"]:not([type="reset"]');

This will still allow any other buttons which appear on the modal to perform as expected.

@trco trco self-assigned this Sep 2, 2023
@trco trco added the Q&A Questions and answers label Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q&A Questions and answers
Projects
None yet
Development

No branches or pull requests

2 participants