From 7e345dd1f91608d69fe2b75cd99bdeab67c0bb7c Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Sun, 17 Nov 2024 10:18:11 +0000 Subject: [PATCH] Add comment --- internal/assets/static/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/assets/static/js/utils.js b/internal/assets/static/js/utils.js index 5f5b2c7..1d1816a 100644 --- a/internal/assets/static/js/utils.js +++ b/internal/assets/static/js/utils.js @@ -28,6 +28,9 @@ export function clamp(value, min, max) { return Math.min(Math.max(value, min), max); } +// NOTE: inconsistent behavior between browsers when it comes to +// whether the newly opened tab gets focused or not, potentially +// depending on the event that this function is called from export function openURLInNewTab(url, focus = true) { const newWindow = window.open(url, '_blank', 'noopener,noreferrer');