@eric-emg/symphiq-components 1.2.27 → 1.2.28
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.
|
@@ -21360,8 +21360,8 @@ class SymphiqFunnelAnalysisDashboardComponent {
|
|
|
21360
21360
|
// Set up container scroll listener when in embedded mode
|
|
21361
21361
|
if (this.embedded()) {
|
|
21362
21362
|
let container = null;
|
|
21363
|
-
console.log('[Scroll Debug] Embedded mode detected, setting up scroll listener');
|
|
21364
|
-
console.log('[Scroll Debug] scrollContainerId:', this.scrollContainerId());
|
|
21363
|
+
console.log('[Scroll Debug v3] Embedded mode detected, setting up scroll listener');
|
|
21364
|
+
console.log('[Scroll Debug v3] scrollContainerId:', this.scrollContainerId());
|
|
21365
21365
|
// If a scroll container ID is provided, use that element
|
|
21366
21366
|
if (this.scrollContainerId()) {
|
|
21367
21367
|
const element = document.getElementById(this.scrollContainerId());
|
|
@@ -21457,20 +21457,29 @@ class SymphiqFunnelAnalysisDashboardComponent {
|
|
|
21457
21457
|
this.onContainerScroll(scrollElement);
|
|
21458
21458
|
}, { passive: true });
|
|
21459
21459
|
console.log('[Scroll Debug] Attached ionScroll listener to ion-content');
|
|
21460
|
-
// FALLBACK: Poll scroll position using requestAnimationFrame
|
|
21460
|
+
// FALLBACK: Poll scroll position using requestAnimationFrame AND Ionic API
|
|
21461
21461
|
// This ensures we catch scroll events even if neither 'scroll' nor 'ionScroll' fire
|
|
21462
|
-
// Check BOTH scrollElement.scrollTop AND ion-content's scrollTop via API
|
|
21463
21462
|
let lastScrollTop = 0;
|
|
21464
|
-
const pollScroll = () => {
|
|
21463
|
+
const pollScroll = async () => {
|
|
21465
21464
|
// Try multiple sources for scroll position
|
|
21466
21465
|
const scrollElTop = scrollElement.scrollTop;
|
|
21467
21466
|
const ionContentScrollTop = ionContent.scrollTop || 0;
|
|
21467
|
+
// Also try getScrollElement() again in case it returns live data
|
|
21468
|
+
let apiScrollTop = 0;
|
|
21469
|
+
try {
|
|
21470
|
+
const liveScrollEl = await ionContent.getScrollElement();
|
|
21471
|
+
apiScrollTop = liveScrollEl?.scrollTop || 0;
|
|
21472
|
+
}
|
|
21473
|
+
catch (e) {
|
|
21474
|
+
// Ignore errors
|
|
21475
|
+
}
|
|
21468
21476
|
// Use whichever is non-zero
|
|
21469
|
-
const currentScrollTop = scrollElTop || ionContentScrollTop;
|
|
21477
|
+
const currentScrollTop = scrollElTop || ionContentScrollTop || apiScrollTop;
|
|
21470
21478
|
if (currentScrollTop !== lastScrollTop) {
|
|
21471
|
-
console.log('[Scroll Debug] Polling detected scroll change:', lastScrollTop, '->', currentScrollTop, {
|
|
21479
|
+
console.log('[Scroll Debug v3] Polling detected scroll change:', lastScrollTop, '->', currentScrollTop, {
|
|
21472
21480
|
scrollElTop,
|
|
21473
|
-
ionContentScrollTop
|
|
21481
|
+
ionContentScrollTop,
|
|
21482
|
+
apiScrollTop
|
|
21474
21483
|
});
|
|
21475
21484
|
lastScrollTop = currentScrollTop;
|
|
21476
21485
|
this.onContainerScroll(scrollElement);
|
|
@@ -21478,7 +21487,7 @@ class SymphiqFunnelAnalysisDashboardComponent {
|
|
|
21478
21487
|
requestAnimationFrame(pollScroll);
|
|
21479
21488
|
};
|
|
21480
21489
|
requestAnimationFrame(pollScroll);
|
|
21481
|
-
console.log('[Scroll Debug] Started scroll position polling');
|
|
21490
|
+
console.log('[Scroll Debug v3] Started scroll position polling');
|
|
21482
21491
|
// Test if scroll event fires by manually triggering a test
|
|
21483
21492
|
console.log('[Scroll Debug] Testing scroll event by programmatically scrolling to 1px...');
|
|
21484
21493
|
scrollElement.scrollTop = 1;
|