mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
disable pointer-events during transitions, closes #436
This commit is contained in:
8
js/ext/angular/src/service/ionicView.js
vendored
8
js/ext/angular/src/service/ionicView.js
vendored
@@ -345,9 +345,15 @@ angular.module('ionic.service.view', ['ui.router'])
|
||||
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
|
||||
opts.enteringElement.addClass('ng-enter');
|
||||
|
||||
// disable any pointer-events from being able to fire
|
||||
document.body.classList.add('disable-pointer-events');
|
||||
|
||||
// start the animations
|
||||
if(opts.leavingElement) {
|
||||
$animate.leave(opts.leavingElement);
|
||||
$animate.leave(opts.leavingElement, function() {
|
||||
// re-enable pointer-events
|
||||
document.body.classList.remove('disable-pointer-events');
|
||||
});
|
||||
}
|
||||
$animate.enter(opts.enteringElement, opts.parentElement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user