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(page): viewport jilter when drag to left-bottom and cannot insert to page bottom from block-hub #4509

Conversation

donteatfriedrice
Copy link
Member

To close #3684 #3924

This issue caused by legacy doc page check api.
Now the page tagName change to 'AFFINE-DOC-PAGE', but the code still check 'AFFINE-DEFAULT-PAGE', this would let function findBlockElement() return pageBlockElement too, and cause calculate drop target position out of page and jilter, this is incorrect, the findBlockElement() function should only return blockElement.

Now we can insert blank lines without jilter:

Screen.Recording.2023-09-01.at.00.11.17.mov

@vercel
Copy link

vercel bot commented Aug 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 31, 2023 4:26pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Aug 31, 2023 4:26pm

@donteatfriedrice donteatfriedrice changed the title fix(page): viewport jilter when drag to left-bottom and cannot insert to page bottom fix(page): viewport jilter when drag to left-bottom and cannot insert to page bottom from block-hub Aug 31, 2023
@doodlewind doodlewind merged commit 6b49d71 into toeverything:master Sep 1, 2023
21 checks passed
@doodlewind
Copy link
Member

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot drag and drop blank lines from blockhub to the bottom of the editor to insert blank lines
2 participants