mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
Allow keyboard navigation on donation dialog
This commit is contained in:
@@ -327,6 +327,7 @@ layout: default
|
||||
downloadButtons.forEach((it) => {
|
||||
it.addEventListener('click', () => {
|
||||
thankYouWrapper.style.display = '';
|
||||
document.querySelector('.btn.btn-donate').focus();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -337,6 +338,13 @@ layout: default
|
||||
thankYouWrapper.style.display = '';
|
||||
});
|
||||
});
|
||||
|
||||
// Close the dialog when the user presses the escape key.
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
thankYouWrapper.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -314,6 +314,7 @@ layout: default
|
||||
downloadButtons.forEach((it) => {
|
||||
it.addEventListener('click', () => {
|
||||
thankYouWrapper.style.display = '';
|
||||
document.querySelector('.btn.btn-donate').focus();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -324,6 +325,13 @@ layout: default
|
||||
thankYouWrapper.style.display = '';
|
||||
});
|
||||
});
|
||||
|
||||
// Close the dialog when the user presses the escape key.
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
thankYouWrapper.style.display = 'none';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user