Skip to content

Commit

Permalink
fix(focus-monitor): set up global listeners in root zone
Browse files Browse the repository at this point in the history
  • Loading branch information
josephperrott committed Jan 23, 2018
1 parent 99cc2e4 commit deda78b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cdk/a11y/focus-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Platform, supportsPassiveEventListeners} from '@angular/cdk/platform';
import {
Directive,
Expand Down Expand Up @@ -202,7 +201,7 @@ export class FocusMonitor implements OnDestroy {

// Note: we listen to events in the capture phase so we can detect them even if the user stops
// propagation.
this._ngZone.runOutsideAngular(() => {
Zone.root.run(() => {
document.addEventListener('keydown', documentKeydownListener, true);
document.addEventListener('mousedown', documentMousedownListener, true);
document.addEventListener('touchstart', documentTouchstartListener,
Expand Down

0 comments on commit deda78b

Please sign in to comment.