@angular/material 13.3.6 → 13.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/datepicker/datepicker-base.mjs +17 -2
- package/esm2020/datepicker/datepicker-input-base.mjs +3 -4
- package/esm2020/expansion/expansion-panel.mjs +3 -3
- package/esm2020/menu/menu.mjs +21 -33
- package/esm2020/tabs/paginated-tab-header.mjs +24 -4
- package/fesm2015/core.mjs +1 -1
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/datepicker.mjs +17 -3
- package/fesm2015/datepicker.mjs.map +1 -1
- package/fesm2015/expansion.mjs +2 -2
- package/fesm2015/expansion.mjs.map +1 -1
- package/fesm2015/menu.mjs +20 -32
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/tabs.mjs +23 -3
- package/fesm2015/tabs.mjs.map +1 -1
- package/fesm2020/core.mjs +1 -1
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/datepicker.mjs +17 -3
- package/fesm2020/datepicker.mjs.map +1 -1
- package/fesm2020/expansion.mjs +2 -2
- package/fesm2020/expansion.mjs.map +1 -1
- package/fesm2020/menu.mjs +20 -32
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/tabs.mjs +23 -3
- package/fesm2020/tabs.mjs.map +1 -1
- package/menu/menu.d.ts +0 -5
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/tabs/paginated-tab-header.d.ts +2 -0
package/fesm2020/datepicker.mjs
CHANGED
|
@@ -2368,6 +2368,21 @@ class MatDatepickerBase {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
this.close();
|
|
2370
2370
|
});
|
|
2371
|
+
// The `preventDefault` call happens inside the calendar as well, however focus moves into
|
|
2372
|
+
// it inside a timeout which can give browsers a chance to fire off a keyboard event in-between
|
|
2373
|
+
// that can scroll the page (see #24969). Always block default actions of arrow keys for the
|
|
2374
|
+
// entire overlay so the page doesn't get scrolled by accident.
|
|
2375
|
+
overlayRef.keydownEvents().subscribe(event => {
|
|
2376
|
+
const keyCode = event.keyCode;
|
|
2377
|
+
if (keyCode === UP_ARROW ||
|
|
2378
|
+
keyCode === DOWN_ARROW ||
|
|
2379
|
+
keyCode === LEFT_ARROW ||
|
|
2380
|
+
keyCode === RIGHT_ARROW ||
|
|
2381
|
+
keyCode === PAGE_UP ||
|
|
2382
|
+
keyCode === PAGE_DOWN) {
|
|
2383
|
+
event.preventDefault();
|
|
2384
|
+
}
|
|
2385
|
+
});
|
|
2371
2386
|
this._componentRef = overlayRef.attach(portal);
|
|
2372
2387
|
this._forwardContentValues(this._componentRef.instance);
|
|
2373
2388
|
// Update the position once the calendar has rendered. Only relevant in dropdown mode.
|
|
@@ -2740,9 +2755,8 @@ class MatDatepickerInputBase {
|
|
|
2740
2755
|
}
|
|
2741
2756
|
/** Formats a value and sets it on the input element. */
|
|
2742
2757
|
_formatValue(value) {
|
|
2743
|
-
this._elementRef.nativeElement.value =
|
|
2744
|
-
? this._dateAdapter.format(value, this._dateFormats.display.dateInput)
|
|
2745
|
-
: '';
|
|
2758
|
+
this._elementRef.nativeElement.value =
|
|
2759
|
+
value != null ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';
|
|
2746
2760
|
}
|
|
2747
2761
|
/** Assigns a value to the model. */
|
|
2748
2762
|
_assignValue(value) {
|