Closed pepkin88 closed 3 months ago
I was having the same problem issue. For now I used the following code to fix it temporarily:
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 "button"
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!
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.