Skip to content
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

[core] feat(Drawer): add shouldReturnFocusOnClose prop #4620

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

adidahiya
Copy link
Contributor

Changes proposed in this pull request:

This new prop provides a way to disable Drawer's default behavior of returning focus to the previous active element (introduced in #4422)

@blueprint-bot
Copy link

[core] feat(Drawer): add returnFocusOnClose prop

Previews: documentation | landing | table

*
* @default true
*/
returnFocusOnClose?: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"return" sounds like an action / function. the name should probably be shouldReturnFocusOnClose

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First thing that comes to mind for me, since it uses document.activeElement, is focusPreviouslyActiveElementOnClose but that's pretty damn wordy.

@adidahiya adidahiya changed the title [core] feat(Drawer): add returnFocusOnClose prop [core] feat(Drawer): add shouldReturnFocusOnClose prop Apr 7, 2021
@adidahiya adidahiya merged commit 991406e into develop Apr 7, 2021
@adidahiya adidahiya deleted the ad/drawer-prop branch April 7, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants