Skip to content

Commit deda78b

Browse files
committed
fix(focus-monitor): set up global listeners in root zone
1 parent 99cc2e4 commit deda78b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cdk/a11y/focus-monitor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
98
import {Platform, supportsPassiveEventListeners} from '@angular/cdk/platform';
109
import {
1110
Directive,
@@ -202,7 +201,7 @@ export class FocusMonitor implements OnDestroy {
202201

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

0 commit comments

Comments
 (0)