Skip to content

Commit d426b47

Browse files
committed
fix: open external links in default browser from macOS PWA…
…by using `window.open(url, "_blank", "noopener")` directly instead of a now-rarely-needed workaround. Fixes #2438
1 parent bcf7dc2 commit d426b47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/javascripts/lib/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,13 @@ $.noop = function () {};
457457

458458
$.popup = function (value) {
459459
try {
460+
window.open(value.href || value, "_blank", "noopener");
461+
} catch (error) {
460462
const win = window.open();
461463
if (win.opener) {
462464
win.opener = null;
463465
}
464466
win.location = value.href || value;
465-
} catch (error) {
466-
window.open(value.href || value, "_blank");
467467
}
468468
};
469469

0 commit comments

Comments
 (0)