mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: prevents events on toolbar when in form (#7567)
If a button is not of type button, pressing enter inside an `<input>` inside a `<form>` without the action attribute will trigger the first available `<button>` as most browsers default the type of an unspecified button to submit. This commit also prevents d-editor-modal to be filled when it's hidden.
This commit is contained in:
parent
105359e54a
commit
b05d7042ae
@ -13,7 +13,8 @@ export default Ember.Component.extend({
|
||||
"disabled",
|
||||
"translatedTitle:title",
|
||||
"translatedLabel:aria-label",
|
||||
"tabindex"
|
||||
"tabindex",
|
||||
"type"
|
||||
],
|
||||
|
||||
btnIcon: Ember.computed.notEmpty("icon"),
|
||||
|
@ -1,7 +1,8 @@
|
||||
{{#unless hidden}}
|
||||
{{yield}}
|
||||
|
||||
{{yield}}
|
||||
|
||||
<div class='controls'>
|
||||
{{d-button class="btn-primary" label="composer.modal_ok" action=(action "ok")}}
|
||||
{{d-button class="btn-danger" label="composer.modal_cancel" action=(action "cancel")}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
{{d-button class="btn-primary" label="composer.modal_ok" action=(action "ok")}}
|
||||
{{d-button class="btn-danger" label="composer.modal_cancel" action=(action "cancel")}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
@ -24,6 +24,7 @@
|
||||
{{else}}
|
||||
{{d-button
|
||||
action=b.action
|
||||
type="button"
|
||||
actionParam=b
|
||||
translatedTitle=b.title
|
||||
label=b.label
|
||||
|
Loading…
Reference in New Issue
Block a user