@angular/cdk 15.2.4 → 15.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/esm2020/menu/menu-trigger.mjs +2 -1
- package/esm2020/overlay/scroll/close-scroll-strategy.mjs +6 -2
- package/esm2020/version.mjs +1 -1
- package/fesm2015/cdk.mjs +1 -1
- package/fesm2015/cdk.mjs.map +1 -1
- package/fesm2015/menu.mjs +2 -0
- package/fesm2015/menu.mjs.map +1 -1
- package/fesm2015/overlay.mjs +5 -2
- package/fesm2015/overlay.mjs.map +1 -1
- package/fesm2020/cdk.mjs +1 -1
- package/fesm2020/cdk.mjs.map +1 -1
- package/fesm2020/menu.mjs +1 -0
- package/fesm2020/menu.mjs.map +1 -1
- package/fesm2020/overlay.mjs +5 -2
- package/fesm2020/overlay.mjs.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/fesm2015/overlay.mjs
CHANGED
|
@@ -8,11 +8,11 @@ import { Injectable, Inject, ElementRef, Optional, ApplicationRef, ANIMATION_MOD
|
|
|
8
8
|
import { coerceCssPixelValue, coerceArray, coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
9
9
|
import * as i1$1 from '@angular/cdk/platform';
|
|
10
10
|
import { supportsScrollBehavior, _isTestEnvironment, _getEventTarget } from '@angular/cdk/platform';
|
|
11
|
+
import { filter, take, takeUntil, takeWhile } from 'rxjs/operators';
|
|
11
12
|
import * as i5 from '@angular/cdk/bidi';
|
|
12
13
|
import { BidiModule } from '@angular/cdk/bidi';
|
|
13
14
|
import { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
14
15
|
import { Subject, Subscription, merge } from 'rxjs';
|
|
15
|
-
import { take, takeUntil, takeWhile } from 'rxjs/operators';
|
|
16
16
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -137,7 +137,10 @@ class CloseScrollStrategy {
|
|
|
137
137
|
if (this._scrollSubscription) {
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
-
const stream = this._scrollDispatcher.scrolled(0)
|
|
140
|
+
const stream = this._scrollDispatcher.scrolled(0).pipe(filter(scrollable => {
|
|
141
|
+
return (!scrollable ||
|
|
142
|
+
!this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement));
|
|
143
|
+
}));
|
|
141
144
|
if (this._config && this._config.threshold && this._config.threshold > 1) {
|
|
142
145
|
this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;
|
|
143
146
|
this._scrollSubscription = stream.subscribe(() => {
|