Commit a0d30b25 by Adam Palay

respond to comments

parent 7b3f5e64
......@@ -56,15 +56,14 @@
});
var onModalClose = function() {
$(".forgot-password-modal .close-modal").off("click");
$("#lean_overlay").off("click");
$("#forgot-password-modal").attr("aria-hidden", "true");
$("#forgot-password-link").focus();
};
var cycle_modal_tab = function(from_element_name, to_element_name) {
$(from_element_name).on('keydown', function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode === 9) {
var TAB_KEY = 9; // 9 corresponds to the tab key
if (keyCode === TAB_KEY) {
e.preventDefault();
$(to_element_name).focus();
}
......@@ -72,9 +71,9 @@
};
$(".forgot-password-modal .close-modal").click(onModalClose);
$("#forgot-password-modal").focus()
cycle_modal_tab(".forgot-password-modal .close-modal", "#pwd_reset_email")
cycle_modal_tab("#forgot-password-modal .close-modal", "#pwd_reset_email")
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")
})(this)
</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