From 99bb8022e1d678f6ee6bfddec5d7f27b820efc90 Mon Sep 17 00:00:00 2001 From: Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:36:49 -0400 Subject: [PATCH] fix: stop Lens subtabs animating the window --- holding/lens.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/holding/lens.js b/holding/lens.js index f31b1d716..9bfb7fd78 100644 --- a/holding/lens.js +++ b/holding/lens.js @@ -1034,6 +1034,12 @@ function setLens(l, animate, writeHistory) { lens = l; if (writeHistory !== false) syncUrl(true); + // Lens tabs replace evidence inside the existing window. Keep that local + // subtab change synchronous; otherwise the site's named axp-window view + // transition makes the whole Lens window play its close/open choreography. + // An explicit true remains available for a future tab transition that + // deliberately opts into motion. + var shouldAnimate = animate === true; withViewTransition(function () { [].forEach.call(document.querySelectorAll(".lx-tab"), function (b) { var active = b.getAttribute("data-lens") === l; @@ -1041,7 +1047,7 @@ b.setAttribute("aria-selected", active ? "true" : "false"); }); if (data) renderMachine(); else { updateModeUi(); renderIdleLens(); } - }, animate); + }, shouldAnimate); } form.addEventListener("submit", function (e) { e.preventDefault(); run(urlInput.value); });