Skip to content
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

Merged
merged 1 commit into from Mar 21, 2021

Conversation

vjeux
Copy link
Contributor

@vjeux vjeux commented Mar 20, 2021

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.

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.
@vercel
Copy link

vercel bot commented Mar 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/Di376HA124QFKLHP1Aqk59S2pqF2
✅ Preview: https://excalidraw-git-fork-vjeux-dontscrollinit-excalidraw.vercel.app

@@ -448,15 +448,8 @@ class CollabWrapper extends PureComponent<Props, CollabState> {

private handleRemoteSceneUpdate = (
elements: ReconciledElements,
{
init = false,
initFromSnapshot = false,
Copy link
Contributor Author

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

@vjeux vjeux changed the title Don't scroll to content on INIT websocket message fix: Don't scroll to content on INIT websocket message Mar 21, 2021
@dwelle
Copy link
Member

dwelle commented Mar 21, 2021

I now recall I wanted to address this firebase/handleRemoteSceneUpdate race condition. But this fix for scroll-to-content can be merged regardless. Thanks!

@dwelle dwelle merged commit 127c1be into excalidraw:master Mar 21, 2021
lipis added a commit that referenced this pull request Mar 23, 2021
…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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants