dropdown_list_widget: Add 'type' attribute to template.

Previously, when the user presses 'Enter' within a input
field while keyboard focus in is in the topic edit textbox
it incorrectly opened the dropdown list widget.

This is because the dropdown button had the default type attribute of
'submit' which triggers the click event binded to it.  Fix it by
explicitly defining it's type attribute to be a button.

Fixes #18415
This commit is contained in:
aryanshridhar
2021-05-14 00:44:40 +05:30
committed by Tim Abbott
parent 352acdcc36
commit 2e334bec89

View File

@@ -5,7 +5,7 @@
{{ label }}
</label>
{{/if}}
<button class="button small rounded dropdown-toggle" data-toggle="dropdown">
<button class="button small rounded dropdown-toggle" type="button" data-toggle="dropdown">
<span id="{{widget_name}}_name"></span>
<i class="fa fa-pencil"></i>
</button>