Commit 6a412f4d by Adam Palay

add ESC key functionality to forgot password modal

parent 9affd38d
...@@ -75,5 +75,15 @@ ...@@ -75,5 +75,15 @@
cycle_modal_tab("#pwd_reset_email", "#pwd_reset_button") cycle_modal_tab("#pwd_reset_email", "#pwd_reset_button")
cycle_modal_tab("#pwd_reset_button", "#forgot-password-modal .close-modal") cycle_modal_tab("#pwd_reset_button", "#forgot-password-modal .close-modal")
// Hitting the ESC key will exit the modal
$("#forgot-password-modal").on("keydown", function(e) {
var keyCode = e.keyCode || e.which;
// 27 is the ESC key
if (keyCode === 27) {
e.preventDefault();
$("#forgot-password-modal .close-modal").click();
}
});
})(this) })(this)
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment