Skip to content
Snippets Groups Projects
Commit 6a412f4d authored by Adam Palay's avatar Adam Palay
Browse files

add ESC key functionality to forgot password modal

parent 9affd38d
No related branches found
No related tags found
No related merge requests found
......@@ -75,5 +75,15 @@
cycle_modal_tab("#pwd_reset_email", "#pwd_reset_button")
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)
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment