This repository has been archived by the owner on May 29, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1341
The second commit, to fix tests isn't necessary. It's here just for thoughts as the
in
class determines whether the modal or backdrop is actually visible.Notes:
I'm not using the
$transition
method itself to create any transitions. I'm actually using the transition module just to determine if the browser supports transitions. Checking for transition support isn't actually necessary as modal still closes within 500ms due to the timeout fallback mechanism.I understand that it's a little hacky that I did a
removeClass('in')
within the remove logic instead of attempting to change thescope.animate
. However, changing the scope.animate for the modal isn't trivial as the modelWindow directive is using an isolate scope. Since the scope has been destroyed, there won't be a conflict between states, the ng-class on modelBackdrop and modelWindow directives no longer have any effect.I realized that isn't any need for multiple backdrop element instances and that the element can be left in the DOM after its first creation, and hidden instead of being removed. This can be a future fix.