Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #3044 from jiniguez/fix2280
Browse files Browse the repository at this point in the history
fix(modal): fix for conflicts with ngTouch module on mobile devices
  • Loading branch information
karianna committed Jan 8, 2015
2 parents eec68d8 + 722036c commit f671e02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
element.addClass(attrs.windowClass || '');
scope.size = attrs.size;

// moved from template to fix issue #2280
element.on('click', function(evt) {
scope.close(evt);
});

$timeout(function () {
// trigger CSS transitions
scope.animate = true;
Expand Down
2 changes: 1 addition & 1 deletion template/modal/window.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{'z-index': 1050 + index*10, display: 'block'}" ng-click="close($event)">
<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{'z-index': 1050 + index*10, display: 'block'}">
<div class="modal-dialog" ng-class="{'modal-sm': size == 'sm', 'modal-lg': size == 'lg'}"><div class="modal-content" modal-transclude></div></div>
</div>

0 comments on commit f671e02

Please sign in to comment.