-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2025-01-22] Forcing re-layout on hook useViewportOffsetTop #55071
Comments
I am Tomek from Callstack, I'd like to work on that issue. |
Triggered auto assignment to @maddylewis ( |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.85-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-01-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@ahmedGaber93 @maddylewis @ahmedGaber93 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalPrecondition:Test:
Do we agree 👍 or 👎 |
I dont think we will need a regression test for this specific case |
Payment Summary
BugZero Checklist (@maddylewis)
|
Payment summary is correct 👍 |
Payment processed via NewDot / payment summary correct / closing this out as completed 👍 |
$250 approved for @ahmedGaber93 |
Background
We use
useViewportOffsetTop
to properly display keyboard on small device on the mobile browsersProblem
We noticed that
window.scrollTo
is being called frequently inuseViewportOffsetTop
, even when the target scroll position has already been reached. This logic is primarily necessary for small screens when using the app in a browser, but it is triggered unnecessarily on all devices.Calling
window.scrollTo
causes redundant style recalculations, which can take up to 13ms.Solution
We can add an additional check to prevent
window.scrollTo
from being triggered when the scroll position is already at the target. This optimization will eliminate unnecessary style recalculations and improve overall performance.Issue Owner
Current Issue Owner: @maddylewisThe text was updated successfully, but these errors were encountered: