Skip to content

Commit 1f27b76

Browse files
committed
Explicitly set type=button on template load buttons, to ensure they do not trigger a form submit
1 parent 506b3c3 commit 1f27b76

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

assets/controllers/templates_controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export default class extends Controller {
144144
menu.innerHTML = "";
145145
for (const template of this._templates) {
146146
const item = document.createElement('button');
147+
item.type = 'button';
147148
item.textContent = template.name;
148149
item.classList.add('dropdown-item');
149150

0 commit comments

Comments
 (0)