palantir/blueprint

Toaster with timeout zero is dismissed early

Open

#6,742 创建于 2024年3月14日

在 GitHub 查看
 (6 评论) (1 反应) (0 负责人)TypeScript (20,263 star) (2,167 fork)batch import
Package: coreType: bughelp wanted

描述

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

贡献者指南