Skip to content

Commit a416c66

Browse files
committed
fix(modal): prevent ghost clicks on close
1 parent 6f9bd35 commit a416c66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: js/angular/service/modal.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ IonicModule
7272
'$ionicTemplateLoader',
7373
'$q',
7474
'$log',
75-
function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $q, $log) {
75+
'$ionicClickBlock',
76+
function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTemplateLoader, $q, $log, $ionicClickBlock) {
7677

7778
/**
7879
* @ngdoc controller
@@ -184,6 +185,10 @@ function($rootScope, $ionicBody, $compile, $timeout, $ionicPlatform, $ionicTempl
184185
var self = this;
185186
var modalEl = jqLite(self.modalEl);
186187

188+
// on iOS, clicks will sometimes bleed through/ghost click on underlying
189+
// elements
190+
$ionicClickBlock.show(600);
191+
187192
self.el.classList.remove('active');
188193
modalEl.addClass('ng-leave');
189194

0 commit comments

Comments
 (0)