fix: Broken external links on shared docs, closes #6962
This commit is contained in:
@@ -50,13 +50,15 @@ export default function useEditorClickHandlers({ shareId }: Params) {
|
|||||||
if (shareId && navigateTo.includes("/doc/")) {
|
if (shareId && navigateTo.includes("/doc/")) {
|
||||||
navigateTo = sharedDocumentPath(shareId, navigateTo);
|
navigateTo = sharedDocumentPath(shareId, navigateTo);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!isModKey(event) && !event.shiftKey) {
|
if (!isModKey(event) && !event.shiftKey) {
|
||||||
history.push(navigateTo);
|
history.push(navigateTo);
|
||||||
} else {
|
} else {
|
||||||
window.open(navigateTo, "_blank");
|
window.open(navigateTo, "_blank");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
window.open(href, "_blank");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[history, shareId]
|
[history, shareId]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user