Uh oh!
There was an error while loading. Please reload this page.
fix: Prevent initial unnecessary IntersectionObserver callback execution - #2523
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
paulhibbitts
left a comment
There was a problem hiding this comment.
Thanks @sy-records , created Sandbox and tested (see issue comments) - all looks good to me!
jhildenbiddle
left a comment
There was a problem hiding this comment.
Looks good, @sy-records. A few minor nitpicks.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Koooooo-7
left a comment
There was a problem hiding this comment.
Shall we promote the isInitialLoad to the Object level as a field?
Then, we could reuse and keep consistence when any logic relies on the same isInitialLoad lifecycle flag in future.
There was a problem hiding this comment.
Thanks @sy-records and @jhildenbiddle , I've retested in the sandbox (with new Preview build) and things look good to me!
https://codesandbox.io/p/sandbox/docsify-v5-sidebar-fix-zwdm6p
Summary
isInitialLoad) to skip the first callback execution of the IntersectionObserver on page load.Related issue, if any:
Fix#2504
Fix#2509
What kind of change does this PR introduce?
Bugfix
For any code change,
Does this PR introduce a breaking change?
No
Yes
No
Tested in the following browsers: