Permalink
Browse files

Fix ui-modal when transitions are enabled

  • Loading branch information...
1 parent b2cd39e commit 5b9438dd28d7b7d96e93e6efeafe49d376e87b55 @ajoslin ajoslin committed Aug 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/directives/modal/modal.js
@@ -9,12 +9,13 @@ angular.module('ui.directives')
scope.$watch(attrs.ngModel, function(value) {
elm.modal(value && 'show' || 'hide');
});
- elm.on('show.ui', function() {
+ //If bootstrap animations are enabled, listen to 'shown' and 'hidden' events
+ elm.on(jQuery.support.transition && 'shown' || 'show', function() {
$timeout(function() {
model.$setViewValue(true);
});
});
- elm.on('hide.ui', function() {
+ elm.on(jQuery.support.transition && 'hidden' || 'hide', function() {
$timeout(function() {
model.$setViewValue(false);
});

0 comments on commit 5b9438d

Please sign in to comment.