Merge pull request #3660 from Guiorgy/patch-1

removed deprecated code in example
This commit is contained in:
Jeremy Thomas 2023-07-18 17:07:27 +02:00 committed by GitHub
commit 3a45c86e57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,9 +120,7 @@ document.addEventListener('DOMContentLoaded', () => {
// Add a keyboard event to close all modals
document.addEventListener('keydown', (event) => {
const e = event || window.event;
if (e.keyCode === 27) { // Escape key
if (event.code === 'Escape') {
closeAllModals();
}
});