palantir/blueprint

Toast animations do not work when multiple toasts are supposed to be animating

开放

#4,516 创建于 2021年2月3日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (2,167 个派生)batch import
P3Package: coreType: bughelp wanted

仓库指标

星标
 (20,263 个星标)
PR 合并指标
 (平均合并 43天 10小时) (30 天内合并 27 个 PR)

描述

Environment

  • Package version(s): 3.38.2
  • Operating System: macOS 10.15
  • Browser name and version: Chrome 88.0.4324.96 (Official Build) (x86_64)

Code Sandbox

Link to a minimal repro: https://blueprintjs.com/docs/#core/components/toast

Steps to reproduce

  • Click any of the toast creation buttons in quick succession
  • OR set a low maximum and try to create a new toast once reaching the maximum
  • OR create a bunch of toasts and then clear() them all at once

Actual behavior

Only the newest/topmost (toast[0]) toast will actually animate, the rest will just instantly snap to their final state.

Expected behavior

All of the toasts will go through their full enter/exit animations.

Possible solution

Not a React guy but the common thread with this bug seems to be that only one animation will play at a time and when multiple animations should be playing only the toast at index 0 actually animates.

贡献者指南