Browse Source

Fix mention links in detailed statuses not opening in the WebUI

closed-social-glitch-2
Thibaut Girka 6 years ago
committed by ThibG
parent
commit
4167ed375b
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      app/javascript/flavours/glitch/features/status/components/detailed_status.js

+ 11
- 1
app/javascript/flavours/glitch/features/status/components/detailed_status.js View File

@ -29,7 +29,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
};
handleAccountClick = (e) => {
if (e.button === 0) {
if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {
e.preventDefault();
this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
}
@ -37,6 +37,15 @@ export default class DetailedStatus extends ImmutablePureComponent {
e.stopPropagation();
}
parseClick = (e, destination) => {
if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {
e.preventDefault();
this.context.router.history.push(destination);
}
e.stopPropagation();
}
handleOpenVideo = (media, startTime) => {
this.props.onOpenVideo(media, startTime);
}
@ -122,6 +131,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
expanded={expanded}
collapsed={false}
onExpandedToggle={onToggleHidden}
parseClick={this.parseClick}
/>
<div className='detailed-status__meta'>

Loading…
Cancel
Save