Describe the bug
Clicking on an editor style button causes the page to reload (the first time)
Steps to Reproduce
Steps to reproduce the behavior:
Fork this or create a new Codesandbox replicating your error
https://codesandbox.io/s/vue-issue-template-h0g28
Expected behavior
Styling buttons should never reload the page but should just apply the styling as expected
Testing
Environment
I've followed the Testing path and took a quick look at the source code.
If I'm not mistaken, when you have a button element inside of a form element, it automatically submits the form after clicking the button.
There are multiple ways of fixing the issue but I think the best approach would be adding the type="button" attribute to each button that is being rendered as the Text Editor button inside the .menubar div container
@kkolasinski I took your advice and it worked!
Thanks so much!
Most helpful comment
I've followed the Testing path and took a quick look at the source code.
If I'm not mistaken, when you have a
buttonelement inside of aformelement, it automatically submits the form after clicking the button.There are multiple ways of fixing the issue but I think the best approach would be adding the
type="button"attribute to each button that is being rendered as the Text Editor button inside the.menubardivcontainer