mirror of https://github.com/vector-im/riot-web
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/8866pull/21833/head
parent
ec6c104e51
commit
3e6199c0f7
|
@ -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 New Issue