mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
don't nest <a> inside <AccessibleButton>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
42b63fbc81
commit
600cb64d00
1 changed files with 19 additions and 15 deletions
|
@ -414,11 +414,16 @@ export default createReactClass({
|
||||||
}
|
}
|
||||||
// XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID)
|
// XXX: if we use room ID, we should also include a server where the event can be found (other than in the domain of the event ID)
|
||||||
const permalinkButton = (
|
const permalinkButton = (
|
||||||
<MenuItem className="mx_MessageContextMenu_field" onClick={this.onPermalinkClick}>
|
<MenuItem
|
||||||
<a href={permalink} target="_blank" rel="noopener" onClick={this.onPermalinkClick} tabIndex={-1}>
|
element="a"
|
||||||
{ mxEvent.isRedacted() || mxEvent.getType() !== 'm.room.message'
|
className="mx_MessageContextMenu_field"
|
||||||
? _t('Share Permalink') : _t('Share Message') }
|
onClick={this.onPermalinkClick}
|
||||||
</a>
|
href={permalink}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>
|
||||||
|
{ mxEvent.isRedacted() || mxEvent.getType() !== 'm.room.message'
|
||||||
|
? _t('Share Permalink') : _t('Share Message') }
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -436,16 +441,15 @@ export default createReactClass({
|
||||||
isUrlPermitted(mxEvent.event.content.external_url)
|
isUrlPermitted(mxEvent.event.content.external_url)
|
||||||
) {
|
) {
|
||||||
externalURLButton = (
|
externalURLButton = (
|
||||||
<MenuItem className="mx_MessageContextMenu_field">
|
<MenuItem
|
||||||
<a
|
element="a"
|
||||||
href={mxEvent.event.content.external_url}
|
className="mx_MessageContextMenu_field"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
onClick={this.closeMenu}
|
onClick={this.closeMenu}
|
||||||
tabIndex={-1}
|
href={mxEvent.event.content.external_url}
|
||||||
>
|
>
|
||||||
{ _t('Source URL') }
|
{ _t('Source URL') }
|
||||||
</a>
|
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue