From 7e42a0f35a1595ecc5bba864a8dd0ab0fb44076d Mon Sep 17 00:00:00 2001 From: Adam Snodgrass Date: Sun, 18 Sep 2022 11:42:55 -0500 Subject: [PATCH] close on escape --- javascript/imageviewer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index 6ca2b4a9..95b8108d 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -53,6 +53,9 @@ function modalKeyHandler(event){ case "ArrowRight": modalNextImage(event) break; + case "Escape": + closeModal(); + break; } }