mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Avoid submitting forms with MarkdownButton
Add type="button" to the component so that it won't submit if placed inside a form. Fixes https://github.com/flarum/core/issues/2875
This commit is contained in:
@@ -11,6 +11,7 @@ export default class MarkdownButton extends Component {
|
|||||||
const button = (
|
const button = (
|
||||||
<button
|
<button
|
||||||
className="Button Button--icon Button--link"
|
className="Button Button--icon Button--link"
|
||||||
|
type="button"
|
||||||
data-hotkey={this.attrs.hotkey}
|
data-hotkey={this.attrs.hotkey}
|
||||||
onkeydown={this.keydown.bind(this)}
|
onkeydown={this.keydown.bind(this)}
|
||||||
onclick={this.attrs.onclick}
|
onclick={this.attrs.onclick}
|
||||||
|
Reference in New Issue
Block a user