File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
src/cdk/a11y/focus-monitor Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -326,17 +326,17 @@ export class FocusMonitor implements OnDestroy {
326
326
// 2) It was caused by a touch event, in which case we mark the origin as 'touch'.
327
327
// 3) The element was programmatically focused, in which case we should mark the origin as
328
328
// 'program'.
329
- let origin = this . _origin ;
330
- if ( ! origin ) {
331
- if ( this . _windowFocused && this . _lastFocusOrigin ) {
332
- return this . _lastFocusOrigin ;
333
- } else if ( this . _wasCausedByTouch ( event ) ) {
334
- return 'touch' ;
335
- } else {
336
- return 'program' ;
337
- }
329
+ if ( this . _origin ) {
330
+ return this . _origin ;
331
+ }
332
+
333
+ if ( this . _windowFocused && this . _lastFocusOrigin ) {
334
+ return this . _lastFocusOrigin ;
335
+ } else if ( this . _wasCausedByTouch ( event ) ) {
336
+ return 'touch' ;
337
+ } else {
338
+ return 'program' ;
338
339
}
339
- return null ;
340
340
}
341
341
342
342
/**
You can’t perform that action at this time.
0 commit comments