You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The first time you open the BCV control for the first time after loading or reloading, it doesn't scroll to the selected book heading. Note: this is not always easily reproducible. Ian Hewerdine has mentioned he can get it consistently, so maybe you can refer to him when investigating.
To Reproduce
Steps to reproduce the behavior:
Open Platform.Bible or Ctrl+R
Click on the BCV selector
Notice it doesn't scroll to the selected book
Click off to close the selector
Click on the BCV selector again
Notice it scrolls to the selected book
Expected behavior
It scrolls properly on first open
TJ has done some significant testing and playing around and has left his work that didn't succeed in 426d2e0...bcv-scroll-fix
(Here is the compare link for the whole branch, but the first commit is in #899)
It looks like the problem in the work on the branch linked above is that offsetTop doesn't get set properly soon enough. Very strange. I saw online somewhere that some claim offsetTop doesn't get set until the document lays out properly and all. However, this is running on useLayoutEffect, so I am confused. We were seeing this same problem before, so we made isContentOpenDelayed to try to combat the problem. But some users are still seeing the issue. Very confusing.
I thought the problem not showing up in the platform-bible-react preview was due to having Strict mode enabled, but I recently tried again and saw that it has the same functionality either way. I can't get it to reproduce on my machine :(
The text was updated successfully, but these errors were encountered:
Describe the bug
The first time you open the BCV control for the first time after loading or reloading, it doesn't scroll to the selected book heading. Note: this is not always easily reproducible. Ian Hewerdine has mentioned he can get it consistently, so maybe you can refer to him when investigating.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It scrolls properly on first open
TJ has done some significant testing and playing around and has left his work that didn't succeed in 426d2e0...bcv-scroll-fix
(Here is the compare link for the whole branch, but the first commit is in #899)
It looks like the problem in the work on the branch linked above is that
offsetTop
doesn't get set properly soon enough. Very strange. I saw online somewhere that some claimoffsetTop
doesn't get set until the document lays out properly and all. However, this is running onuseLayoutEffect
, so I am confused. We were seeing this same problem before, so we madeisContentOpenDelayed
to try to combat the problem. But some users are still seeing the issue. Very confusing.I thought the problem not showing up in the
platform-bible-react
preview was due to having Strict mode enabled, but I recently tried again and saw that it has the same functionality either way. I can't get it to reproduce on my machine :(The text was updated successfully, but these errors were encountered: