-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fixed playground draggable block while scrolled #5844
base: main
Are you sure you want to change the base?
Conversation
Adjusted the ondrop so the element is able to be dropped at the top while scrolled
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I guess this PR is meant to supersede the #5839 ? So 5839 is closable? |
Correct, is there a way to append a PR without making a new one? I'm still new with open-source contributions still lol |
You should have just pushed to the original branch, it would have reflected in the existing Pull Request. No worries! We were all once beginners :) I'll close the other PR. |
Still not able to reproduce this issue in the current Playground |
@@ -361,7 +361,8 @@ function useDraggableBlockMenu( | |||
return true; | |||
} | |||
const targetBlockElemTop = targetBlockElem.getBoundingClientRect().top; | |||
if (pageY / calculateZoomLevel(target) >= targetBlockElemTop) { | |||
const adjsutedTop = targetBlockElemTop + window.scrollY; | |||
if (pageY / calculateZoomLevel(target) >= adjsutedTop) { |
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.
nit: typo in adjsutedTop
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.
@Legonois are you planning on fixing the typo, so we can proceed forward with the merge
Just checked the deployments for the bug and it seems fixed! Tell me if there is anything else I need to do before this can be pulled to main |
perhaps rebase and fix the typo |
Last pull request did not include the fix for the actual on drop event, only for the placement of the target line. This adjusts the drop event to account for scrolling