mirror of
https://github.com/godotengine/godot-website.git
synced 2026-01-06 14:09:58 +03:00
Allow keyboard navigation on donation dialog
This commit is contained in:
@@ -327,6 +327,7 @@ layout: default
|
|||||||
downloadButtons.forEach((it) => {
|
downloadButtons.forEach((it) => {
|
||||||
it.addEventListener('click', () => {
|
it.addEventListener('click', () => {
|
||||||
thankYouWrapper.style.display = '';
|
thankYouWrapper.style.display = '';
|
||||||
|
document.querySelector('.btn.btn-donate').focus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -337,6 +338,13 @@ layout: default
|
|||||||
thankYouWrapper.style.display = '';
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ layout: default
|
|||||||
downloadButtons.forEach((it) => {
|
downloadButtons.forEach((it) => {
|
||||||
it.addEventListener('click', () => {
|
it.addEventListener('click', () => {
|
||||||
thankYouWrapper.style.display = '';
|
thankYouWrapper.style.display = '';
|
||||||
|
document.querySelector('.btn.btn-donate').focus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -324,6 +325,13 @@ layout: default
|
|||||||
thankYouWrapper.style.display = '';
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user