mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: external link not opening (#7859)
This commit is contained in:
parent
a33a400f01
commit
d917db438e
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue