-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2075: some dialogs email settings unenroll not keyboard navigable #2079
2075: some dialogs email settings unenroll not keyboard navigable #2079
Conversation
{this.renderRunUnenrollmentModal(enrollment)} | ||
{this.renderEmailSettingsDialog(enrollment)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick explanation: Reactstrap Dropdowns attach event handlers to all react children (not dom children); the handlers call preventDefault
on keydown events, see https://github.com/reactstrap/reactstrap/blob/6085ac0bb340f3e2cdae1aec4e6abec38c37ebad/src/Dropdown.js#L354. Normally, a keydown event on a button element is followed by a click event; but if you call preventDefault
on the keydown event, the click event never happens.
There's no reason, afaik, that the modal needs to be a child of the dropdown, so moving it outside the dropdown fixes the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Working as expected now.
@collinpreston Actually, looking at the code, I suspect that I'm not sure how to trigger that dialog, though. |
What are the relevant tickets?
#2075
Description (What does it do?)
Resolves in issue with using the keyboard to navigate and control the browser when the either the unenroll modal or email settings modal is open for a course enrollment.
How can this be tested?
You should have a course created and be enrolled.