Closed Yura33-dev closed 3 months ago
Name | Link |
---|---|
Latest commit | f3039bb4936e62166e596b6322d2a1ef32489bfc |
Latest deploy log | https://app.netlify.com/sites/one-fall/deploys/66a163d967ec640008954dab |
Deploy Preview | https://deploy-preview-20--one-fall.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Good morning, @naumch1k !
I have pushed a new changes according to your comment. But I don't sure about correctness of my code. Could you please check it ?) Thanks a lot!
Hi again, @naumch1k ! 👋
I have found a little bug with scroll at iOS devices. 🐞 But don't mind it, I have fixed it in my last commit. 😅 I have made some changes in getting of scrolled height approach. And got rid of smooth scrolling after close mobile menu. Now it works as expected! 🎉 But could you please recheck my code, when you have chance?
Also I have found way how to open website in local network at my mobile devices using WiFi. Thanks for your tips about it in today's meeting! 🤝
@Yura33-dev Glad to hear my tip was helpful!
Could briefly describe what was the bug you mentioned and what this code does please 🙏 This seems to run for all cases not only iOS devices, is that correct?
const getBodyTop: string = getComputedStyle(document.body).top
const getScrollY: number = parseInt(getBodyTop.replace(/\D/g, ''), 10) || 0
Hey, @naumch1k !
There was a bug: when you open a website, then a little scroll it down (eg. 50px) this amount of px have been saved somewhere in memory and multiples by two each next reloaded the page. Thus, 50px changes to 100px, then 200px, then 400px and so on. And every page reload sends you lower and lower the page. To tell you the truth, I don't know why this bug happened.
This code:
const getBodyTop: string = getComputedStyle(document.body).top
const getScrollY: number = parseInt(getBodyTop.replace(/\D/g, ''), 10) || 0
is more correctly way (especially for iOS) to get scrolled amount of px in order to return user at point where mobile menu has been opened.
And yes, it works fine for all devices, not only for iOS.
@Yura33-dev Thanks for providing more details! I've asked my mentor, Oleksandr, to review this code since he was the first to identify the bug. He also experienced horizontal scrolling on Windows OS even before the first modal was opened. Hopefully, he'll find some time by the end of the week 😉
@Yura33-dev Thanks for providing more details! I've asked my mentor, Oleksandr, to review this code since he was the first to identify the bug. He also experienced horizontal scrolling on Windows OS even before the first modal was opened. Hopefully, he'll find some time by the end of the week 😉
So strange... I have not horizontal scrolling. Okay, just wait for his advice about it 🙂
Description
This PR removes a few problem which existing in project:
Task Link
This Pull request resolves #19
Changes Made
Some changes have been made in
useModal
anduseOverlayMenu
hooks as well asNavigation.module.css
.