@angular/cdk 10.2.0-rc.0 → 10.2.0
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-drag-drop.umd.js +17 -17
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +11 -11
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +5 -2
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +5 -5
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.js +15 -26
- package/bundles/cdk-testing-testbed.umd.js.map +1 -1
- package/bundles/cdk-testing-testbed.umd.min.js +6 -6
- package/bundles/cdk-testing-testbed.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +1 -1
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/index.d.ts +1 -2
- package/drag-drop/index.metadata.json +1 -1
- package/drag-drop/public-api.d.ts +2 -1
- package/esm2015/drag-drop/index.js +1 -3
- package/esm2015/drag-drop/public-api.js +3 -2
- package/esm2015/overlay/dispatchers/overlay-outside-click-dispatcher.js +6 -3
- package/esm2015/testing/testbed/unit-test-element.js +2 -8
- package/esm2015/version.js +1 -1
- package/fesm2015/cdk.js +1 -1
- package/fesm2015/cdk.js.map +1 -1
- package/fesm2015/drag-drop.js +16 -16
- package/fesm2015/drag-drop.js.map +1 -1
- package/fesm2015/overlay.js +5 -2
- package/fesm2015/overlay.js.map +1 -1
- package/fesm2015/testing/testbed.js +1 -7
- package/fesm2015/testing/testbed.js.map +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/index.js +1 -1
|
@@ -912,14 +912,17 @@
|
|
|
912
912
|
_this._clickListener = function (event) {
|
|
913
913
|
// Get the target through the `composedPath` if possible to account for shadow DOM.
|
|
914
914
|
var target = event.composedPath ? event.composedPath()[0] : event.target;
|
|
915
|
-
|
|
915
|
+
// We copy the array because the original may be modified asynchronously if the
|
|
916
|
+
// outsidePointerEvents listener decides to detach overlays resulting in index errors inside
|
|
917
|
+
// the for loop.
|
|
918
|
+
var overlays = _this._attachedOverlays.slice();
|
|
916
919
|
// Dispatch the mouse event to the top overlay which has subscribers to its mouse events.
|
|
917
920
|
// We want to target all overlays for which the click could be considered as outside click.
|
|
918
921
|
// As soon as we reach an overlay for which the click is not outside click we break off
|
|
919
922
|
// the loop.
|
|
920
923
|
for (var i = overlays.length - 1; i > -1; i--) {
|
|
921
924
|
var overlayRef = overlays[i];
|
|
922
|
-
if (overlayRef._outsidePointerEvents.observers.length < 1) {
|
|
925
|
+
if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {
|
|
923
926
|
continue;
|
|
924
927
|
}
|
|
925
928
|
// If it's a click inside the overlay, just break - we should do nothing
|