mirror of
https://github.com/excalidraw/excalidraw
synced 2025-07-25 13:58:22 +08:00
fix: external link not opening (#7859)
This commit is contained in:
@ -4953,11 +4953,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
}
|
}
|
||||||
if (!customEvent?.defaultPrevented) {
|
if (!customEvent?.defaultPrevented) {
|
||||||
const target = isLocalLink(url) ? "_self" : "_blank";
|
const target = isLocalLink(url) ? "_self" : "_blank";
|
||||||
const newWindow = window.open(
|
const newWindow = window.open(undefined, target);
|
||||||
undefined,
|
|
||||||
target,
|
|
||||||
"noopener noreferrer",
|
|
||||||
);
|
|
||||||
// https://mathiasbynens.github.io/rel-noopener/
|
// https://mathiasbynens.github.io/rel-noopener/
|
||||||
if (newWindow) {
|
if (newWindow) {
|
||||||
newWindow.opener = null;
|
newWindow.opener = null;
|
||||||
|
Reference in New Issue
Block a user