@angular/cdk 12.2.5 → 12.2.6
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/bundles/cdk-a11y.umd.js +11 -13
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +22 -1
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/esm2015/a11y/input-modality/input-modality-detector.js +12 -14
- package/esm2015/stepper/stepper.js +23 -2
- package/esm2015/version.js +1 -1
- package/fesm2015/a11y.js +11 -13
- package/fesm2015/a11y.js.map +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/stepper.js +22 -1
- package/fesm2015/stepper.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/stepper/index.metadata.json +1 -1
- package/stepper/stepper.d.ts +2 -0
package/bundles/cdk-a11y.umd.js
CHANGED
|
@@ -2021,15 +2021,13 @@
|
|
|
2021
2021
|
this.modalityChanged = this.modalityDetected.pipe(operators.distinctUntilChanged());
|
|
2022
2022
|
// If we're not in a browser, this service should do nothing, as there's no relevant input
|
|
2023
2023
|
// modality to detect.
|
|
2024
|
-
if (
|
|
2025
|
-
|
|
2024
|
+
if (_platform.isBrowser) {
|
|
2025
|
+
ngZone.runOutsideAngular(function () {
|
|
2026
|
+
document.addEventListener('keydown', _this._onKeydown, modalityEventListenerOptions);
|
|
2027
|
+
document.addEventListener('mousedown', _this._onMousedown, modalityEventListenerOptions);
|
|
2028
|
+
document.addEventListener('touchstart', _this._onTouchstart, modalityEventListenerOptions);
|
|
2029
|
+
});
|
|
2026
2030
|
}
|
|
2027
|
-
// Add the event listeners used to detect the user's input modality.
|
|
2028
|
-
ngZone.runOutsideAngular(function () {
|
|
2029
|
-
document.addEventListener('keydown', _this._onKeydown, modalityEventListenerOptions);
|
|
2030
|
-
document.addEventListener('mousedown', _this._onMousedown, modalityEventListenerOptions);
|
|
2031
|
-
document.addEventListener('touchstart', _this._onTouchstart, modalityEventListenerOptions);
|
|
2032
|
-
});
|
|
2033
2031
|
}
|
|
2034
2032
|
Object.defineProperty(InputModalityDetector.prototype, "mostRecentModality", {
|
|
2035
2033
|
/** The most recently detected input modality. */
|
|
@@ -2040,12 +2038,12 @@
|
|
|
2040
2038
|
configurable: true
|
|
2041
2039
|
});
|
|
2042
2040
|
InputModalityDetector.prototype.ngOnDestroy = function () {
|
|
2043
|
-
|
|
2044
|
-
|
|
2041
|
+
this._modality.complete();
|
|
2042
|
+
if (this._platform.isBrowser) {
|
|
2043
|
+
document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);
|
|
2044
|
+
document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);
|
|
2045
|
+
document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);
|
|
2045
2046
|
}
|
|
2046
|
-
document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);
|
|
2047
|
-
document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);
|
|
2048
|
-
document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);
|
|
2049
2047
|
};
|
|
2050
2048
|
return InputModalityDetector;
|
|
2051
2049
|
}());
|