T45c Site · Home: full screen stops the glide at once, a starting gallery leaves the host's focus alone, a focused frame stays mounted

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 08:38:05 -04:00
1 parent d7dbcfbb18
commit 9ea811d4e8
7 files changed
+55 -17

No files matched your search

+5 -5
View File
@@ -18,6 +18,11 @@
// Embedded, gpui's hidden field waits for a press or key.
if (window.parent !== window) {
let touched = false;
// Until then its focus calls leave the host's focus alone.
const focus = HTMLElement.prototype.focus;
HTMLElement.prototype.focus = function (options) {
if (touched) focus.call(this, options);
};
const touch = () => {
if (touched) return;
touched = true;
@@ -25,11 +30,6 @@
};
addEventListener("pointerdown", touch, true);
addEventListener("keydown", touch, true);
document.addEventListener("focusin", (event) => {
if (touched) return;
event.target.blur();
window.parent.focus();
}, true);
}
</script>
<script type="module">