diff --git a/zoomerang.js b/zoomerang.js index c78ea35..9088baa 100644 --- a/zoomerang.js +++ b/zoomerang.js @@ -315,6 +315,9 @@ overlay.addEventListener('click', api.close) wrapper.addEventListener('click', api.close) + window.addEventListener('keydown', function(e) { + if (e.keyCode === 27) api.close() + }) // umd expose if (typeof exports == "object") {