Fix composer format buttons on WebKit (#7898)

This commit is contained in:
Robin 2022-02-25 08:20:06 -05:00 committed by GitHub
parent e762a6947d
commit 76ca0362e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View file

@ -103,8 +103,12 @@ class FormatButton extends React.PureComponent<IFormatButtonProps> {
</div>
</div>;
// element="button" and type="button" are necessary for the buttons to work on WebKit,
// otherwise the text is deselected before onClick can ever be called
return (
<AccessibleTooltipButton
element="button"
type="button"
onClick={this.props.onClick}
title={this.props.label}
tooltip={tooltip}