Skip to content

Commit

Permalink
fix(modal): prevent ghost clicks on close
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Apr 11, 2015
1 parent 6f9bd35 commit a416c66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/angular/service/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ IonicModule
'$ionicTemplateLoader',
'$q',
'$log',
function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $q, $log) {
'$ionicClickBlock',
function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $q, $log, $ionicClickBlock) {

/**
* @ngdoc controller
Expand Down Expand Up @@ -184,6 +185,10 @@ function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTempl
var self = this;
var modalEl = jqLite(self.modalEl);

// on iOS, clicks will sometimes bleed through/ghost click on underlying
// elements
$ionicClickBlock.show(600);

self.el.classList.remove('active');
modalEl.addClass('ng-leave');

Expand Down

0 comments on commit a416c66

Please sign in to comment.