-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MWPW-161858] - fix: [Sticky bottom issues with high resolution with short content page] #3191
Conversation
added addtional check for footer
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #3191 +/- ##
==========================================
+ Coverage 95.69% 96.37% +0.68%
==========================================
Files 165 245 +80
Lines 43542 56613 +13071
==========================================
+ Hits 41668 54563 +12895
- Misses 1874 2050 +176 ☔ View full report in Codecov by Sentry. |
This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR. |
|
||
if (entry.target === document.querySelector('footer')) { | ||
isFooterStart = entry.isIntersecting; | ||
} | ||
|
||
if (entry.isIntersecting || abovePromoStart || isFooterStart) el.classList.add('hide-sticky-section'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can reduce the complexity for this, and not cache isFooterStart
:
if (entry.target === document.querySelector('footer')) { | |
isFooterStart = entry.isIntersecting; | |
} | |
if (entry.isIntersecting || abovePromoStart || isFooterStart) el.classList.add('hide-sticky-section'); | |
if (entry.isIntersecting || | |
abovePromoStart || | |
(entry.target === document.querySelector('footer') && entry.isIntersecting)) { | |
el.classList.add('hide-sticky-section'); | |
} |
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
A new PR was opened for this issue: #3402 |
From MWPW-161858: When the footer is in the view screen, a block with sticky-bottom to add "hide-sticky-section" and display none.
Resolves: MWPW-161858
Test URLs: