-
Notifications
You must be signed in to change notification settings - Fork 19
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
3020: Fix unexpected scrolling behaviour in mobile desktop #3050
base: main
Are you sure you want to change the base?
3020: Fix unexpected scrolling behaviour in mobile desktop #3050
Conversation
feb9bb7
to
38729d8
Compare
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.
@lunars97 are all of these changes necessary to fix the issue? Can you elaborate which change fixes which problem?
yes, these changes should fix the issue
|
38729d8
to
1f118a5
Compare
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.
Great fix, thank you!
1f118a5
to
0d501c2
Compare
0d501c2
to
871aa75
Compare
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.
Nice solution 🤩 from now on I will keep an eye on any visibility propriety that could cause issues like this ... that was unexpected.
visibility: show ? 'visible' : 'hidden', | ||
top: window.scrollY > 0 ? `${window.scrollY}px` : undefined, | ||
display: show ? 'block' : 'none', | ||
top: scrollY > 0 ? `${scrollY}px` : undefined, |
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 tried to remove this top completely and it didn't affect anything at this page not sure if we can remove it...
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.
fair question,I think we do not need it here completely
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.
@f1sh1918 do you still remember why we needed this in the first place? To me it also looks like it works just fine without setting anything as top
.
Short description
Currently the category pages are having additional scrollable blank height after the toolbar footer on the small screens if the side kebab-menu is activated. This might be happening because of the
visibility: hidden
attribute of thePortal
potentially taking up unintended space due to it being a part of the DOM, therefore it could still occupy space.Proposed changes
Portal
element having the absolute positionwindow.scrollY
to calculate and memoize the value and to make sure the side menu starts at the top of the screenTesting
Side effects
-should be none?
Resolved issues
Fixes: #3020