mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 21:30:39 +00:00
Internal link repair (#2828)
This commit is contained in:
@@ -38,7 +38,17 @@ class MarkdownContentViewer extends React.Component {
|
||||
|
||||
onLinkClick = (event) => {
|
||||
event.preventDefault();
|
||||
this.props.onLinkClick(event);
|
||||
let link = '';
|
||||
if (event.target.tagName !== 'A') {
|
||||
let target = event.target.parentNode;
|
||||
while (target.tagName !== 'A') {
|
||||
target = target.parentNode;
|
||||
}
|
||||
link = target.href;
|
||||
} else {
|
||||
link = event.target.href;
|
||||
}
|
||||
this.props.onLinkClick(link);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user