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

Need support onFocus and onBlur events for time handling #490

Open
georg-pandekhfumani-redshelf opened this issue May 10, 2022 · 0 comments

Comments

@georg-pandekhfumani-redshelf

Need to support onFocus and onBlur events in Snackbar.js file to prevent hiding snackbar when we have focus on it.

Expected Behavior

When we focus on snackbar / close icon / action buttons - don't hide snackbar. When we blur from snackbar - resume timer. When we have focus and did onMouseLeave event - don't hide snackbar, beacuse we still focused on it.

Current Behavior

When we focus on Snackbar - timer didn't stoped.

Steps to Reproduce

  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.

In the link use "default" snackbar where we have action buttons.
Link:

  1. https://codesandbox.io/s/github/iamhosseindhv/notistack/tree/master/examples/simple-example

Context

Your Environment

Tech Version
Notistack v2.0.4
React -
Browser Chrome 101.0.4951.54
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

No branches or pull requests

1 participant