Skip to content

Core | Toast issue:  #2755

@sr1dh4r

Description

@sr1dh4r

Environment

[Core]
  onsenui latest
  
[Platform]
  Desktop - OS X 10.13.6 64-bit

[Browser]
  Desktop - Chrome 83.0.4103.61 on OS X 10.13.6 64-bit

Encountered problem
When I cancel a toast, I cannot show another toast until the timeout has finished.

Also, is there a way I can just add a dismiss option in the toast without having to define custom definitions since I need to add a new define for every toast message ??

How to reproduce
Click on "Queue notification toast (top)" button to show a toast ..
Click on the cancel button to cancel the toast which hides it.
Click on "Queue notification toast (top)" again to show a new toast ..
The new toast doesn't show up until the earlier timeout has finished.

Demo link

  • HTML
<ons-page>
  <p>
    <ons-button
      onclick="ons.notification.toast('Hi there!', { timeout: 5000, animation: 'fall' })"
    >
      Queue notification toast (top)
    </ons-button>

<br><br>

    <ons-button
      onclick="document.querySelector('ons-toast').hide()"
    >
      cancel ..
    </ons-button>
    <br><br>


  </p>

</ons-page>
  • JS

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