File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -304,9 +304,9 @@ export class MatStartDate<D> extends _MatDateRangeInputBase<D> implements CanUpd
304
304
event . preventDefault ( ) ;
305
305
endInput . _elementRef . nativeElement . setSelectionRange ( 0 , 0 ) ;
306
306
endInput . focus ( ) ;
307
+ } else {
308
+ super . _onKeydown ( event ) ;
307
309
}
308
-
309
- super . _onKeydown ( event ) ;
310
310
}
311
311
}
312
312
@@ -402,10 +402,9 @@ export class MatEndDate<D> extends _MatDateRangeInputBase<D> implements CanUpdat
402
402
if ( event . keyCode === BACKSPACE && ! element . value ) {
403
403
startInput . focus ( ) ;
404
404
}
405
-
406
405
// If the user hits LEFT (LTR) when at the start of the input (and no
407
406
// selection), move the cursor to the end of the start input.
408
- if (
407
+ else if (
409
408
( ( event . keyCode === LEFT_ARROW && isLtr ) || ( event . keyCode === RIGHT_ARROW && ! isLtr ) ) &&
410
409
element . selectionStart === 0 &&
411
410
element . selectionEnd === 0
@@ -414,8 +413,8 @@ export class MatEndDate<D> extends _MatDateRangeInputBase<D> implements CanUpdat
414
413
const endPosition = startInput . _elementRef . nativeElement . value . length ;
415
414
startInput . _elementRef . nativeElement . setSelectionRange ( endPosition , endPosition ) ;
416
415
startInput . focus ( ) ;
416
+ } else {
417
+ super . _onKeydown ( event ) ;
417
418
}
418
-
419
- super . _onKeydown ( event ) ;
420
419
}
421
420
}
You can’t perform that action at this time.
0 commit comments