mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(click): remove native click prevent 400ms later
When an actionsheet/popup is open, everything under it has `pointer-events:none`. However, once they are removed then the click prevent was removed immediately too, but the click that comes in 300ms later was still firing whatever would have been underneath the actionsheet/popup. Instead, wait 400ms before removing the click prevent, which would block the native click. Closes #2204
This commit is contained in:
6
js/angular/service/actionSheet.js
vendored
6
js/angular/service/actionSheet.js
vendored
@@ -119,7 +119,11 @@ function($rootScope, $compile, $animate, $timeout, $ionicTemplateLoader, $ionicP
|
||||
|
||||
scope.removed = true;
|
||||
sheetEl.removeClass('action-sheet-up');
|
||||
$ionicBody.removeClass('action-sheet-open');
|
||||
$timeout(function(){
|
||||
// wait to remove this due to a 300ms delay native
|
||||
// click which would trigging whatever was underneath this
|
||||
$ionicBody.removeClass('action-sheet-open');
|
||||
}, 400);
|
||||
scope.$deregisterBackButton();
|
||||
stateChangeListenDone();
|
||||
|
||||
|
||||
6
js/angular/service/popup.js
vendored
6
js/angular/service/popup.js
vendored
@@ -398,7 +398,11 @@ function($ionicTemplateLoader, $ionicBackdrop, $q, $timeout, $rootScope, $ionicB
|
||||
previousPopup.show();
|
||||
} else {
|
||||
//Remove popup-open & backdrop if this is last popup
|
||||
$ionicBody.removeClass('popup-open');
|
||||
$timeout(function(){
|
||||
// wait to remove this due to a 300ms delay native
|
||||
// click which would trigging whatever was underneath this
|
||||
$ionicBody.removeClass('popup-open');
|
||||
}, 400);
|
||||
$ionicBackdrop.release();
|
||||
($ionicPopup._backButtonActionDone || angular.noop)();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user