Fix composer format buttons on WebKit (#7898)
This commit is contained in:
parent
e762a6947d
commit
76ca0362e1
2 changed files with 12 additions and 6 deletions
|
@ -37,12 +37,6 @@ limitations under the License.
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: $panel-actions;
|
|
||||||
border-radius: 6px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageComposerFormatBar_button {
|
.mx_MessageComposerFormatBar_button {
|
||||||
|
@ -50,6 +44,14 @@ limitations under the License.
|
||||||
height: 28px;
|
height: 28px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $panel-actions;
|
||||||
|
border-radius: 6px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageComposerFormatBar_button::after {
|
.mx_MessageComposerFormatBar_button::after {
|
||||||
|
|
|
@ -103,8 +103,12 @@ class FormatButton extends React.PureComponent<IFormatButtonProps> {
|
||||||
</div>
|
</div>
|
||||||
</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 (
|
return (
|
||||||
<AccessibleTooltipButton
|
<AccessibleTooltipButton
|
||||||
|
element="button"
|
||||||
|
type="button"
|
||||||
onClick={this.props.onClick}
|
onClick={this.props.onClick}
|
||||||
title={this.props.label}
|
title={this.props.label}
|
||||||
tooltip={tooltip}
|
tooltip={tooltip}
|
||||||
|
|
Loading…
Reference in a new issue