-
Notifications
You must be signed in to change notification settings - Fork 17
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
Zoomer buttons cause a form submition #39
Comments
I was having the same problem issue. const zoomist = new Zoomist('.zoomist-container', {
on: {
ready(zoomist, scale) {
$('.zoomist-zoomer-button').attr("type", "button");
}
}
}) After ready and the buttons are created add the type |
cotton123236
pushed a commit
that referenced
this issue
Jun 5, 2024
Hey @pepkin88 @adriallongarriu , The buttons are set the type attribute to button by default now (v2.0.12). Thanks for waiting and liking this library! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because the zoomer buttons don't have the type attribute set on them, it gets the default value, which is submit. That's why when Zoomist gets instantiated inside a form, clicking on those button will cause a form submission.
The solution to this would be setting the type attribute to
"button"
upon the element creation.The text was updated successfully, but these errors were encountered: