Skip to content

[BUG] - Toast promises cause DOMException #6406

@AshotN

Description

@AshotN

HeroUI Version

3.0.2

Describe the bug

Whenever a toast promise is replaced it throws a DOMException Uncaught (in promise) DOMException: Skipped ViewTransition due to another transition starting

Your Example Website or App

https://heroui.com/docs/react/components/toast#promise--loading

Steps to Reproduce the Bug or Issue

 <Button
            size="sm"
            variant="secondary"
            onPress={() => {
              const loadingId = toast("Uploading file...", {
                description: "Please wait while we upload your file",
                isLoading: true,
                timeout: 0,
              });

              setTimeout(() => {
                toast.close(loadingId);
                toast.success("File uploaded", {
                  description: "Your file has been uploaded successfully",
                });
              }, 3000);
            }}
          >
            Upload with loading
          </Button>

The toast.success call is the problem

Expected behavior

No error

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions