1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 14:21:23 +00:00

optimize seafile editor link click

This commit is contained in:
杨顺强
2024-01-30 09:45:46 +08:00
parent 7417853897
commit 790917c433
4 changed files with 11 additions and 50 deletions

View File

@@ -28,28 +28,6 @@ class SdocWikiPageViewer extends React.Component {
this.scrollRef = React.createRef();
}
componentDidMount() {
// const eventBus = EventBus.getInstance();
// this.unsubscribeLinkClick = eventBus.subscribe(EXTERNAL_EVENTS.ON_LINK_CLICK, this.onLinkClick);
}
componentWillUnmount() {
// this.unsubscribeLinkClick();
}
onLinkClick = (event) => {
event.preventDefault();
event.stopPropagation();
let link = '';
let target = event.target;
while (!target.dataset || !target.dataset.url) {
target = target.parentNode;
}
if (!target) return;
link = target.dataset.url;
this.props.onLinkClick(link);
};
changeInlineNode = (item) => {
const { repoID } = this.props;
let url, imagePath;