loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Set "type=button" for editor's toolbar buttons (#26510)

The editor usually is in a form, so the buttons should have
"type=button", avoid conflicting with the form's submit.

authored by

wxiaoguang and committed by
GitHub
d317c983 e9d631ec

+2
+2
web_src/js/features/comp/ComboMarkdownEditor.js
··· 79 79 for (const el of this.textareaMarkdownToolbar.querySelectorAll('.markdown-toolbar-button')) { 80 80 // upstream bug: The role code is never executed in base MarkdownButtonElement https://github.com/github/markdown-toolbar-element/issues/70 81 81 el.setAttribute('role', 'button'); 82 + // the editor usually is in a form, so the buttons should have "type=button", avoiding conflicting with the form's submit. 83 + if (el.nodeName === 'BUTTON' && !el.getAttribute('type')) el.setAttribute('type', 'button'); 82 84 } 83 85 84 86 const monospaceButton = this.container.querySelector('.markdown-switch-monospace');