Skip to content

[5.x]: Notification toast messages stacking #16688

@mmikkel

Description

@mmikkel

What happened?

Description

Ran into this today – if I replace multiple files in succession via an asset element index, the notification toast messages keep accumulating/stacking, even if they are dismissed (or automatically removed by Craft after X seconds).

In the below screenshot, I've replaced 5 files – hence there are 5 "New file uploaded" toast messages. The messages keep accumulating until the browser is reloaded.

Image

Steps to reproduce

  1. Navigate to an asset element index with at least two files
  2. Select one of the assets, and replace it with a new file via the "Replace file" element index action. A "New file uploaded" toast notification message will appear.
  3. Wait for the notification message to disappear, or dismiss it via the X button in the toast.
  4. Deselect the asset, and select another one. Replace that file as well, via the same element index action. Now, there will be two identical "New file uploaded" toast messages.

Expected behavior

Notification messages that have disappeared or been dismissed, should not reappear.

Actual behavior

Dismissed/disappeared notification messages reappear when the next element action occurs, if the browser isn't reloaded between element actions.

Craft CMS version

5.6.6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions