Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add bidirectonal isolation for pills #8985

Merged
merged 7 commits into from
Jul 5, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/components/views/elements/Pill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,14 @@ export default class Pill extends React.Component<IProps, IState> {
tip = <Tooltip label={resource} alignment={Alignment.Right} />;
}

return <MatrixClientContext.Provider value={this.matrixClient}>
return <bdi><MatrixClientContext.Provider value={this.matrixClient}>
{ this.props.inMessage ?
<a
className={classes}
href={href}
onClick={onClick}
onMouseOver={this.onMouseOver}
onMouseLeave={this.onMouseLeave}
dir="auto"
>
{ avatar }
<span className="mx_Pill_linkText">{ linkText }</span>
Expand All @@ -274,13 +273,12 @@ export default class Pill extends React.Component<IProps, IState> {
className={classes}
onMouseOver={this.onMouseOver}
onMouseLeave={this.onMouseLeave}
dir="auto"
>
{ avatar }
<span className="mx_Pill_linkText">{ linkText }</span>
{ tip }
</span> }
</MatrixClientContext.Provider>;
</MatrixClientContext.Provider></bdi>;
} else {
// Deliberately render nothing if the URL isn't recognised
return null;
Expand Down