Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(select): interimElement will resolve its promise even when transi…
Browse files Browse the repository at this point in the history
…tion end event is not fired

Occassionally the transitionEnd event will not fire and the '$mdUtil. waitTransitionEnd()' process will timeout; which
rejects the pending promise. Using '.finally()' allows the correct handlers to fire and will continuing to propagate the rejected
promise.

Fixes #3704. Fixes #3780. Fixes #3800. Closes #3794.
  • Loading branch information
Robert Messerle authored and ThomasBurleson committed Jul 18, 2015
1 parent 171b7ed commit d6a938e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/services/interimElement/interimElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function InterimElementProvider() {
},
remove: function() {
self.cancelTimeout();
return removeDone = $q.when(showDone).then(function() {
return removeDone = $q.when(showDone).finally(function() {
var ret = element ? options.onRemove(options.scope, element, options) : true;

// Trigger onRemoving callback *before* the remove operation starts
Expand Down

3 comments on commit d6a938e

@petebacondarwin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be some kind of unit test to demonstrate this problem before fixing, right?

@ThomasBurleson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@petebacondarwin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Please sign in to comment.