-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(sidenav): Only restore focus if user interaction was keyboard #5583
Conversation
Normally the Sidenav restores every time the last active element, so the focus won't disappear from the triggered button after closing the sidenav Fixes angular#5563
I want to point to @marcysutton, what do you think? |
@devversion - what do you mean point-to ? @marcysutton can you review this PR ? |
I am currently traveling but I will review it when I get a chance. |
@ThomasBurleson Yeah I mean she should review my PR. And I have a little question to you, what means the new label?, can u even take a look at the code? @marcysutton, @ThomasBurleson: I will try to improve / refactor that code Perhaps I should provide a global service for the last interaction type?. Now the listener get registered foreach |
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 References angular#5583
I created a second PR to fix that issue. This time its a feature which can be used in other components too (my favorite one). It got already tested manually. |
@devversion as #5589 is the active PR can i close this one? |
@EladBezalel Yes, I prefer the #5589 PR, but keep this PR open, I'm still waiting for a decision, which variant we will take |
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 References angular#5583 feat(interaction): add test for interaction which fakes a keyboard input and validates it test(interaction): add interaction spec for mousedown event + formats 4 spaces to 2 style(interaction): fix styling of the previous commits
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589 feat(interaction): add test for interaction which fakes a keyboard input and validates it test(interaction): add interaction spec for mousedown event + formats 4 spaces to 2 style(interaction): fix styling of the previous commits
I think that's definitely the wrong way of implementation, so I will close this for cleanup purposes |
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589 feat(interaction): add test for interaction which fakes a keyboard input and validates it test(interaction): add interaction spec for mousedown event + formats 4 spaces to 2 style(interaction): fix styling of the previous commits test(sidenav): add sidenav focus restore test triggered by keyboard test(sidenav): add focus restore test for mouse and patch other one fix(sidenav): test
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589 feat(interaction): add test for interaction which fakes a keyboard input and validates it test(interaction): add interaction spec for mousedown event + formats 4 spaces to 2 style(interaction): fix styling of the previous commits test(sidenav): add sidenav focus restore test triggered by keyboard test(sidenav): add focus restore test for mouse and patch other one fix(sidenav): test fix(sidenav): replace deprecated methods, and remove aria label test(sidenav): revert deprecated methods.
Sidenav want's to restore focus after the pane gets closed, this should only happen for keyboard interactions. The service got created to use that feature for other components too Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589 feat(interaction): add test for interaction which fakes a keyboard input and validates it test(interaction): add interaction spec for mousedown event + formats 4 spaces to 2 style(interaction): fix styling of the previous commits test(sidenav): add sidenav focus restore test triggered by keyboard test(sidenav): add focus restore test for mouse and patch other one fix(sidenav): test fix(sidenav): replace deprecated methods, and remove aria label test(sidenav): revert deprecated methods.
Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589
Fixes angular#5563 Fixes angular#5434 Closes angular#5583 Closes angular#5589
Normally the Sidenav restores every time the last active element, so the focus won't disappear from the triggered button after closing the sidenav
Fixes #5563