@homebound/beam 2.169.2 → 2.170.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,13 @@ function MenuItemImpl(props) {
|
|
|
27
27
|
if (typeof onClick === "string") {
|
|
28
28
|
// if it is an absolute URL, then open in new window. Assuming this should leave the App
|
|
29
29
|
if ((0, utils_1.isAbsoluteUrl)(onClick)) {
|
|
30
|
-
window.open(
|
|
30
|
+
// We want to do `window.open(url, "_blank", "noopener,noreferrer")` but that Safari treats
|
|
31
|
+
// that as "open in new window", this happens when safari has the "Open pages in tabs instead of windows" set to "Automatically" (which is the default)
|
|
32
|
+
// see https://support.apple.com/guide/safari/tabs-ibrw1045/mac (Open pages in tabs instead of windows) for other behaviors
|
|
33
|
+
//
|
|
34
|
+
// So we do this instead, and at least null out the opener
|
|
35
|
+
// as a way to manually mimic the `"noopener"` flag.
|
|
36
|
+
window.open(onClick, "_blank").opener = null;
|
|
31
37
|
return;
|
|
32
38
|
}
|
|
33
39
|
// Otherwise, it is a relative URL and we'll assume it is still within the App.
|