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

Toaster with timeout zero is dismissed early #6742

Open
dylangrandmont opened this issue Mar 14, 2024 · 6 comments · Fixed by #6783 · May be fixed by #7059
Open

Toaster with timeout zero is dismissed early #6742

dylangrandmont opened this issue Mar 14, 2024 · 6 comments · Fixed by #6783 · May be fixed by #7059

Comments

@dylangrandmont
Copy link
Contributor

Environment

  • Package version(s): "@blueprintjs/core": "^5.10.0",
  • Operating System: Mac OS 14
  • Browser name and version: Chrome 122

Code Sandbox

Code sandbox

Steps to reproduce

See the linked code sandbox

  1. Open a Toast with timeout of 0. Note that focusing the toast will dismiss it (without clicking the 'x')
  2. Note that with an explicit timeout (e.g. 100_000) this is not the case; Toast remains open after focusing.
  3. timeout: Infinity is poorly behaved; Toast immediately closes

Actual behavior

See above and also screen recording from sandbox:

Screen.Recording.2024-03-14.at.11.45.53.AM.mov

Expected behavior

Toast with timeout: 0 should not dismiss early. timeout: Infinity should also behave the same as timeout: 0

@gluxon
Copy link
Contributor

gluxon commented May 3, 2024

Thanks for the bug report @dylangrandmont! Fix for 0 here #6783. We should probably handle Infinity better as you mentioned.

@gluxon
Copy link
Contributor

gluxon commented May 3, 2024

Will leave this open for the Infinity part of the problem.

@gluxon gluxon reopened this May 3, 2024
@ericjeney
Copy link
Contributor

Thanks, @gluxon! Let's also track adding a test case as part of fixing this issue.

@AustineChi
Copy link

Thanks, @gluxon! Let's also track adding a test case as part of fixing this issue.

Hi @ericjeney , I'd like to work on resolving the issue with handling timeout: Infinity. Please can you let me know if someone is working on this already?

@gluxon
Copy link
Contributor

gluxon commented Jul 13, 2024

Hey @AustineChi, I hadn't started yet. Would appreciate the help.

JML321 added a commit to JML321/blueprint that referenced this issue Nov 12, 2024
@JML321
Copy link

JML321 commented Nov 14, 2024

Hi @gluxon , @dylangrandmont , and @ericjeney - I've submitted PR #7059 to address the timeout: Infinity behavior issue and included a test case. Would appreciate your review when you have a chance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment