-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
fix: Don't scroll to content on INIT websocket message #3291
Conversation
If you load a shared scene with at least another person on the scene, you can start seeing the content via the firebase response. If you scroll and you receive the response from the websocket INIT, then it scrolls you back to the center which is jarring. This PR removes the scroll to content for that use case.
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/excalidraw/excalidraw/Di376HA124QFKLHP1Aqk59S2pqF2 |
@@ -448,15 +448,8 @@ class CollabWrapper extends PureComponent<Props, CollabState> { | |||
|
|||
private handleRemoteSceneUpdate = ( | |||
elements: ReconciledElements, | |||
{ | |||
init = false, | |||
initFromSnapshot = false, |
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 can't find any reference of initFromSnapshot in the codebase and this is a private method
I now recall I wanted to address this firebase/handleRemoteSceneUpdate race condition. But this fix for scroll-to-content can be merged regardless. Thanks! |
…rtal * 'master' of github.com:excalidraw/excalidraw: (194 commits) fix: Make help toggle tabbable (#3310) chore: Update translations from Crowdin (#3270) chore(deps): bump @types/jest from 26.0.20 to 26.0.21 (#3298) chore(deps): bump @types/react-dom from 17.0.1 to 17.0.2 (#3296) chore(deps): bump @types/react from 17.0.2 to 17.0.3 (#3297) fix: Show Windows share icon for Windows users (#3306) fix: Update browser-fs-access to use new supported export (#3303) feat: replaces fontSize and fontFamily text with icons (#2857) fix: use random IV for link-sharing encryption (#2829) (#2833) fix: Don't scroll to content on INIT websocket message (#3291) docs: Release @excalidraw/excalidraw@0.5.0 🎉 (#3289) feat: set window.name in excalidraw app & also support target for excalidraw libraries (#3299) chore(deps-dev): bump css-loader in /src/packages/utils (#3292) chore(deps-dev): bump css-loader in /src/packages/excalidraw (#3293) chore(deps-dev): bump webpack in /src/packages/utils (#3294) chore(deps-dev): bump webpack in /src/packages/excalidraw (#3295) feat: support pasting file contents & always prefer system clip (#3257) fix: Don't show export and delete when library is empty (#3288) feat: Add label for name field and use input when editable in export dialog (#3286) fix: overflow in textinput in export dialog (#3284) ...
If you load a shared scene with at least another person on the scene, you can start seeing the content via the firebase response. If you scroll and you receive the response from the websocket INIT, then it scrolls you back to the center which is jarring.
This PR removes the scroll to content for that use case.