disable pointer-events during transitions, closes #436

This commit is contained in:
Adam Bradley
2014-01-20 09:47:18 -06:00
parent 343279dae4
commit 628252b1cd
3 changed files with 12 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
- Created ionic.Platform.fullscreen() and .showStatusBar()
- Update to Angular v1.2.8
- Update AngularUI Router to v0.2.8
- Disable pointer-events during transitions
## 0.9.20 "Alpha Lynx" (2014-01-14)

View File

@@ -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);

View File

@@ -19,6 +19,10 @@
display: inline-block;
}
.disable-pointer-events {
pointer-events: none;
}
.block {
display: block;
clear: both;