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