palantir/blueprint

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

Open

#4,516 建立於 2021年2月3日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (20,263 star) (2,167 fork)batch import
P3Package: coreType: bughelp wanted

描述

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.

貢獻者指南