@skyux/core 5.2.2 → 5.2.3
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.
@@ -2973,17 +2973,22 @@
|
|
2973
2973
|
SkyScrollableHostService.prototype.watchScrollableHostScrollEvents = function (elementRef) {
|
2974
2974
|
var _this = this;
|
2975
2975
|
var subscribers = [];
|
2976
|
+
var scrollableHost;
|
2976
2977
|
var newScrollableHostObservable = new rxjs.Subject();
|
2977
2978
|
var scrollableHostSubscription;
|
2978
2979
|
var scrollEventSubscription;
|
2979
2980
|
return new rxjs.Observable(function (subscriber) {
|
2980
2981
|
subscribers.push(subscriber);
|
2981
2982
|
if (subscribers.length === 1) {
|
2982
|
-
scrollableHostSubscription = _this.watchScrollableHost(elementRef).subscribe(function (
|
2983
|
+
scrollableHostSubscription = _this.watchScrollableHost(elementRef).subscribe(function (newScrollableHost) {
|
2983
2984
|
newScrollableHostObservable.next();
|
2984
2985
|
newScrollableHostObservable.complete();
|
2986
|
+
if (scrollableHost && scrollableHost !== newScrollableHost) {
|
2987
|
+
notifySubscribers(subscribers);
|
2988
|
+
}
|
2989
|
+
scrollableHost = newScrollableHost;
|
2985
2990
|
newScrollableHostObservable = new rxjs.Subject();
|
2986
|
-
scrollEventSubscription = rxjs.fromEvent(
|
2991
|
+
scrollEventSubscription = rxjs.fromEvent(newScrollableHost, 'scroll')
|
2987
2992
|
.pipe(operators.takeUntil(newScrollableHostObservable))
|
2988
2993
|
.subscribe(function () {
|
2989
2994
|
notifySubscribers(subscribers);
|
@@ -3036,6 +3041,7 @@
|
|
3036
3041
|
mutationObserver.observe(element, {
|
3037
3042
|
attributes: true,
|
3038
3043
|
attributeFilter: ['class', 'style.overflow', 'style.overflow-y'],
|
3044
|
+
childList: true,
|
3039
3045
|
subtree: true,
|
3040
3046
|
});
|
3041
3047
|
}
|
@@ -3043,6 +3049,7 @@
|
|
3043
3049
|
mutationObserver.observe(document.documentElement, {
|
3044
3050
|
attributes: true,
|
3045
3051
|
attributeFilter: ['class', 'style.overflow', 'style.overflow-y'],
|
3052
|
+
childList: true,
|
3046
3053
|
subtree: true,
|
3047
3054
|
});
|
3048
3055
|
}
|