manage focus to/from/within password reset modal appropriately - #1065
Conversation
|
Looks good to me. Thx for the help! 👍 |
There was a problem hiding this comment.
Can you either set a constant named TAB_KEY and use that, or add a comment explaining that 9 corresponds to the tab key? JS key codes are always super confusing.
There was a problem hiding this comment.
Use ID instead of class for forgot-password-modal, to match the rest of the file. In fact, I'd suggest that you remove the confusing forgot-password-modal class from the element, and see if everything still works; based on a quick search through the source code, I don't see that class being referred to anywhere.
|
@talbs , I looked through the code, and the class "forgot-password-modal" isn't used anywhere. Nothing seems to break by removing it. Are you ok with getting rid of it? |
|
@adampalay, if things are working fine without, I'm fine with losing it. |
|
👍 Merge it. |
manage focus to/from/within password reset modal appropriately
…ion-announcement Update caption of photo on Gates Foundation announcement
IE version bump
Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
Shamelessly appropriates @antoviaque's work on https://github.com/edx/edx-platform/pull/902/ and applies it to the "forgot password" modal.
Now, when you click "forgot password", focus is shifted to the new modal's "x" button. Tabbing now appropriately cycles through the modal, and when the modal is exited, focus is returned to the "forgot modal" link.
@talbs @singingwolfboy
(addresses https://edx-wiki.atlassian.net/browse/LMS-1166)