mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
feat(nav): detach ChangeDetectorRef during transition
This commit is contained in:
@ -2,7 +2,7 @@ import {Injectable, NgZone} from 'angular2/angular2';
|
||||
|
||||
import {Config} from '../config/config';
|
||||
import {Form} from './form';
|
||||
import {hasFocusedTextInput, raf} from './dom';
|
||||
import {hasFocusedTextInput, raf, rafFrames} from './dom';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@ -35,9 +35,11 @@ export class Keyboard {
|
||||
|
||||
function checkKeyboard() {
|
||||
if (!self.isOpen()) {
|
||||
self.zone.run(() => {
|
||||
console.debug('keyboard closed');
|
||||
callback();
|
||||
rafFrames(30, () => {
|
||||
self.zone.run(() => {
|
||||
console.debug('keyboard closed');
|
||||
callback();
|
||||
});
|
||||
});
|
||||
|
||||
} else {
|
||||
@ -47,7 +49,7 @@ export class Keyboard {
|
||||
|
||||
setTimeout(checkKeyboard, pollingInternval);
|
||||
});
|
||||
|
||||
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user