add ESC key functionality to forgot password modal
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user