Skip to content

Commit

Permalink
Explicitly set type=button on template load buttons, to ensure they d…
Browse files Browse the repository at this point in the history
…o not trigger a form submit
  • Loading branch information
jbtronics committed Oct 27, 2024
1 parent 506b3c3 commit 1f27b76
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/controllers/templates_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export default class extends Controller {
menu.innerHTML = "";
for (const template of this._templates) {
const item = document.createElement('button');
item.type = 'button';
item.textContent = template.name;
item.classList.add('dropdown-item');

Expand Down

0 comments on commit 1f27b76

Please sign in to comment.