This commit is contained in:
Shintaro Jokagi 2025-05-19 21:46:06 +08:00 committed by GitHub
commit 9dd6fd1bd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,6 +130,14 @@ const {
window.addEventListener('scroll', toggleScrollButton)
versionButton?.addEventListener('click', openVersionModal)
versionList?.addEventListener('click', navigateToVersion)
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && modal?.hasAttribute('open')) {
closeModal(modal)
// Remove scroll lock if present
document.body.style.overflow = ''
}
})
</script>
<style is:global>