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

feature/fix: add support onBlur and onFocus #489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

georg-pandekhfumani-redshelf
Copy link

@georg-pandekhfumani-redshelf georg-pandekhfumani-redshelf commented May 10, 2022

issue: #490
Problem: So, basically if we talking about accessibility - when user have focus on the snackbar we shouldn't hide snackbar after some autoHideDuration time. Notistack doesn't supports onFocus and onBlur events.

Steps to reproduce problem:

  1. use 'Tab' key or screen reader to focus on snackbar (close icon, actions buttons, whole snackbar);
  2. see that snackbar hides after autoHideDuration time passes.

How to test:

  1. use 'Tab' key to focus on snackbar and be sure that snackbar doesn't close,
  2. use 'Tab' key or mouse click on other space to blur and be sure that snackbar hide after autoHideDuration provided time.
  3. use 'Tab' key to focus on snackbar and make onMouseLeave event and be sure that timer didn't resumed and snackbar didn't hide.

@ghost
Copy link

ghost commented May 10, 2022

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

@georg-pandekhfumani-redshelf
Copy link
Author

Hey @iamhosseindhv, did you get an ability to look at this PR? If you need from me to clarify something feel free to ask.

@slayybelle
Copy link

Hey, thanks for doing this! Hopefully someone will review it soon?

@puranjayjain
Copy link

With a forwarded ref's help someone can do this in a custom notification component without the need for adding the handlers as you did.

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