blueprint icon indicating copy to clipboard operation
blueprint copied to clipboard

Toaster with timeout zero is dismissed early

Open dylangrandmont opened this issue 11 months ago • 5 comments

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:

https://github.com/palantir/blueprint/assets/20345725/40bc7800-1b37-4cf9-bd1a-405425e835df

Expected behavior

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

dylangrandmont avatar Mar 14 '24 17:03 dylangrandmont

Thanks for the bug report @dylangrandmont! Fix for 0 here https://github.com/palantir/blueprint/pull/6783. We should probably handle Infinity better as you mentioned.

gluxon avatar May 03 '24 14:05 gluxon

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

gluxon avatar May 03 '24 18:05 gluxon

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

ericjeney avatar May 03 '24 19:05 ericjeney

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?

AustineChi avatar Jul 13 '24 09:07 AustineChi

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

gluxon avatar Jul 13 '24 13:07 gluxon