@eric-emg/symphiq-components 1.2.365 → 1.2.367
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.
|
@@ -88681,6 +88681,8 @@ class ShopProfileQuestionAnswerComponent {
|
|
|
88681
88681
|
this.saveButtonsDisabled = computed(() => {
|
|
88682
88682
|
return this.selectedAnswerTexts().length === 0 || this.addOtherAnswersExpanded();
|
|
88683
88683
|
}, ...(ngDevMode ? [{ debugName: "saveButtonsDisabled" }] : []));
|
|
88684
|
+
this.lastScrollTop = 0;
|
|
88685
|
+
this.scrollLogCount = 0;
|
|
88684
88686
|
// Initialize selected answers from existing profile answers
|
|
88685
88687
|
effect(() => {
|
|
88686
88688
|
const questionId = this.question().id;
|
|
@@ -88689,11 +88691,31 @@ class ShopProfileQuestionAnswerComponent {
|
|
|
88689
88691
|
.map(a => a.answer || '');
|
|
88690
88692
|
this.selectedAnswerTexts.set(existingAnswers);
|
|
88691
88693
|
});
|
|
88694
|
+
// Log when isSticky changes
|
|
88695
|
+
effect(() => {
|
|
88696
|
+
const sticky = this.isSticky();
|
|
88697
|
+
console.log(`[ScrollDebug] isSticky changed to: ${sticky}`);
|
|
88698
|
+
});
|
|
88692
88699
|
}
|
|
88693
88700
|
onScroll() {
|
|
88694
88701
|
const container = this.scrollContainer?.nativeElement;
|
|
88695
88702
|
if (container) {
|
|
88696
|
-
|
|
88703
|
+
const scrollTop = container.scrollTop;
|
|
88704
|
+
const scrollHeight = container.scrollHeight;
|
|
88705
|
+
const clientHeight = container.clientHeight;
|
|
88706
|
+
const wasSticky = this.isSticky();
|
|
88707
|
+
const willBeSticky = scrollTop > 10;
|
|
88708
|
+
// Detect scroll jumps (scroll position changed by more than 50px unexpectedly)
|
|
88709
|
+
const scrollDelta = scrollTop - this.lastScrollTop;
|
|
88710
|
+
const isJump = Math.abs(scrollDelta) > 50;
|
|
88711
|
+
this.scrollLogCount++;
|
|
88712
|
+
console.log(`[ScrollDebug #${this.scrollLogCount}] scrollTop: ${scrollTop.toFixed(1)}, delta: ${scrollDelta.toFixed(1)}, isJump: ${isJump}, wasSticky: ${wasSticky}, willBeSticky: ${willBeSticky}, scrollHeight: ${scrollHeight}, clientHeight: ${clientHeight}`);
|
|
88713
|
+
if (isJump) {
|
|
88714
|
+
console.warn(`[ScrollDebug] JUMP DETECTED! From ${this.lastScrollTop.toFixed(1)} to ${scrollTop.toFixed(1)} (delta: ${scrollDelta.toFixed(1)})`);
|
|
88715
|
+
console.trace('[ScrollDebug] Stack trace for jump:');
|
|
88716
|
+
}
|
|
88717
|
+
this.lastScrollTop = scrollTop;
|
|
88718
|
+
this.isSticky.set(willBeSticky);
|
|
88697
88719
|
}
|
|
88698
88720
|
}
|
|
88699
88721
|
toggleAnswer(text) {
|