Update radio button status upon full screen change

This commit is contained in:
Christian Semmler 2025-07-08 15:16:19 -07:00
parent 89ef30348a
commit 6a1b545887
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -1264,6 +1264,15 @@
document.exitFullscreen(); document.exitFullscreen();
} }
}); });
// Event listener for changes in fullscreen state (e.g., F11 or Esc key)
document.addEventListener('fullscreenchange', () => {
if (document.fullscreenElement) {
fullscreenElement.checked = true;
} else {
windowedElement.checked = true;
}
});
}); });
</script> </script>