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] fix(Toaster): disable invasive focus management #5066

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Dec 9, 2021

Fixes #5032

Changes proposed in this pull request:

Disable the Overlay shouldReturnFocusOnClose feature for toasts, since it doesn't make sense to do this kind of focus management for toasts.

Reviewers should focus on:

Pretty simple change, you can see that it only affects these lines of code execution for the Toaster Overlay:

if (this.props.shouldReturnFocusOnClose && this.lastActiveElementBeforeOpened instanceof HTMLElement) {
this.lastActiveElementBeforeOpened.focus();
}

Screenshot

N/A

@blueprint-bot
Copy link

[core] fix(Toaster): disable invasive focus management

Previews: documentation | landing | table | modern colors demo

@adidahiya adidahiya merged commit 6fd4be0 into develop Dec 9, 2021
@adidahiya adidahiya deleted the ad/fix-toaster-focus branch December 9, 2021 19:48
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.

Toast drop focus on close
2 participants