Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion holding/lens.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,20 @@
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;
b.classList.toggle("is-on", active);
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); });
Expand Down