fix: close keyframe bypasses on protected controls without policing skin layout

Hold @keyframes to the same hide/yeet checks as regular declarations,
including escaped and namespaced animation names. Loosen decorative
host-chrome layout locks so open skins can restyle layout freely.
Listen for the recovery shortcut in the capture phase, move the
load-failure banner into the host-owned layer, and fix recovery
aria-labels.
This commit is contained in:
OddTurtleHead committed 2026-11-15 01:09:42 +08:00
1 parent a84f66b47d
commit a4ae4de82f
9 files changed
+286 -57

No files matched your search

+6 -3
View File
@@ -162,13 +162,16 @@ function openLibrary() {
}
function onKeydown(event: KeyboardEvent) {
if (event.defaultPrevented || event.repeat || !thirdPartyAllowed.value) return;
if (event.repeat || !thirdPartyAllowed.value) return;
// The recovery chord must survive a capture-phase preventDefault() from a
// skin or plugin, so it runs before the defaultPrevented check below.
if (isRecoveryShortcut(event)) {
event.preventDefault();
shortcutOpen.value = true;
void nextTick(() => recoveryPopover.value?.querySelector("button")?.focus());
return;
}
if (event.defaultPrevented) return;
if (event.key === "Escape" && shortcutOpen.value) shortcutOpen.value = false;
}
@@ -184,13 +187,13 @@ onMounted(() => {
refreshLauncherReachability();
reachabilityTimer = setInterval(refreshLauncherReachability, 1000);
window.addEventListener("resize", refreshLauncherReachability);
window.addEventListener("keydown", onKeydown);
window.addEventListener("keydown", onKeydown, true);
void nextTick(syncPopover);
});
onBeforeUnmount(() => {
if (reachabilityTimer) clearInterval(reachabilityTimer);
window.removeEventListener("resize", refreshLauncherReachability);
window.removeEventListener("keydown", onKeydown);
window.removeEventListener("keydown", onKeydown, true);
layer?.dispose();
});
</script>