Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
buttons: Set "button" type to prevent default submission in forms.
Sayam Samale729020d1333
diff --git a/web/templates/components/action_button.hbs b/web/templates/components/action_button.hbsindex 4a3de00c51e..79014e68bad 100644--- a/web/templates/components/action_button.hbs+++ b/web/templates/components/action_button.hbs@@ -1,4 +1,4 @@-<button class="{{#if custom_classes}}{{custom_classes}} {{/if}}action-button action-button-{{type}}-{{intent}}" tabindex="0">+<button type="button" class="{{#if custom_classes}}{{custom_classes}} {{/if}}action-button action-button-{{type}}-{{intent}}" tabindex="0">{{#if icon}}<i class="zulip-icon zulip-icon-{{icon}}"></i>{{/if}}diff --git a/web/templates/components/icon_button.hbs b/web/templates/components/icon_button.hbsindex c50892f6dbd..6c178c849b2 100644--- a/web/templates/components/icon_button.hbs+++ b/web/templates/components/icon_button.hbs@@ -1,3 +1,3 @@-<button class="{{#if custom_classes}}{{custom_classes}} {{/if}}icon-button {{#if squared}}icon-button-square {{/if}}icon-button-{{intent}}" {{#if data-tooltip-template-id}}data-tooltip-template-id="{{data-tooltip-template-id}}"{{/if}} tabindex="0">+<button type="button" class="{{#if custom_classes}}{{custom_classes}} {{/if}}icon-button {{#if squared}}icon-button-square {{/if}}icon-button-{{intent}}" {{#if data-tooltip-template-id}}data-tooltip-template-id="{{data-tooltip-template-id}}"{{/if}} tabindex="0"><i class="zulip-icon zulip-icon-{{icon}}"></i></button>