Change Markdown buttons to onClick
`AccessibleButton` expects click handlers, which we can use here, as long we make some additional changes to avoid race processing the new state (see subsequent patch). Fixes https://github.com/vector-im/riot-web/issues/8866
This commit is contained in:
parent
ec6c104e51
commit
3e6199c0f7
2 changed files with 2 additions and 2 deletions
|
@ -501,7 +501,7 @@ export default class MessageComposer extends React.Component {
|
|||
{ formatButtons }
|
||||
<div style={{ flex: 1 }}></div>
|
||||
<AccessibleButton className="mx_MessageComposer_formatbar_markdown mx_MessageComposer_markdownDisabled"
|
||||
onMouseDown={this.onToggleMarkdownClicked}
|
||||
onClick={this.onToggleMarkdownClicked}
|
||||
title={_t("Markdown is disabled")}
|
||||
/>
|
||||
<AccessibleButton element="img" title={_t("Hide Text Formatting Toolbar")}
|
||||
|
|
|
@ -1603,7 +1603,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
</div>
|
||||
<div className={className}>
|
||||
<AccessibleButton className={markdownClasses}
|
||||
onMouseDown={this.onMarkdownToggleClicked}
|
||||
onClick={this.onMarkdownToggleClicked}
|
||||
title={this.state.isRichTextEnabled ? _t("Markdown is disabled") : _t("Markdown is enabled")}
|
||||
/>
|
||||
<Editor ref={this._collectEditor}
|
||||
|
|
Loading…
Reference in a new issue