Skip to content

Commit

Permalink
Add type="button" in buttons.
Browse files Browse the repository at this point in the history
The default is `type="submit"`
  • Loading branch information
XhmikosR committed Sep 24, 2021
1 parent 00bfc58 commit 18e18a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.html
Expand Up @@ -89,7 +89,7 @@ <h1>SVGOMG</h1>
</div>
<div class="toolbar">
<div class="menu-toolbar-item">
<button class="unbutton menu-btn">
<button class="unbutton menu-btn" type="button">
{% include "partials/icons/menu.svg" %}
</button>
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ <h1 class="settings-sub-heading">Features</h1>
{% endfor %}
</section>
<div class="setting-reset-row">
<button class="unbutton setting-reset">Reset all</button>
<button class="unbutton setting-reset" type="button">Reset all</button>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/js/page/ui/toasts.js
Expand Up @@ -16,6 +16,7 @@ class Toast {
for (const button of buttons) {
const buttonElement = document.createElement('button');
buttonElement.className = 'unbutton';
buttonElement.type = 'button';
buttonElement.textContent = button;
buttonElement.addEventListener('click', () => {
this._answerResolve(button);
Expand Down

0 comments on commit 18e18a7

Please sign in to comment.