You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
Action toasts are firing the success call back when they are dismissed due to the timeout being reached / auto dismissing. This wasn't the case in 0.10, 0.9.8, etc.
This was an intentional change #3558.
The demo should probably be changed to say something else.
But, I think it might be useful to be able to differentiate between clicking the button and timing out.
Maybe resolving with a value of true vs false ?
But, I think it might be useful to be able to differentiate between clicking the button and timing out.
Maybe resolving with a value of true vs false ?
👍
The action button being clicked seems like a pretty common use case, which was more or less broken by #3558. Out of curiosity, was there a reason why it was changed from cancel to hide? Couldn't the promise's finally been used for the timeout?
@mckenzielong - The reason for this change is that a hide-action !== reject-response === cancel-action. I will be fixing this issue to be included with the pending 0.10.1-rc2.
Internally all menu, dialog, and toast elements now resolve with 'true' for hide or timeout responses; unless overridden in the .hide(value) call. Toast click actions now resolve with 'ok'; see demo.
Overview of the Issue
Action toasts are firing the success call back when they are dismissed due to the timeout being reached / auto dismissing. This wasn't the case in 0.10, 0.9.8, etc.
Browsers and Operating System
Windows 7, Chrome 43.0.2357.132
Reproduce the error
Reproducible on the toast demo: https://material.angularjs.org/HEAD/#/demo/material.components.toast -- click the 'show with action' toast and wait for the toast to auto hide. The callback if fired and you are alerted that you clicked 'OK'
Related Issues
Might be related to #3704?
The text was updated successfully, but these errors were encountered: