-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 the horizontal block list drop indicator when dragging to the start #43944
Fix the horizontal block list drop indicator when dragging to the start #43944
Conversation
Size Change: +478 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
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.
LGTM 👍
@@ -18,7 +18,7 @@ test.describe( 'Draggable block', () => { | |||
await admin.createNewPost(); | |||
} ); | |||
|
|||
test( 'can drag and drop to the top of a block list', async ( { | |||
test( 'can drag and drop to the top of a vertical block list', async ( { |
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.
Note that changing the test's title will cause the reporter to open a new issue since it's the only id. I think it's okay though.
What?
Fixes this comment - #32880 (comment)
Why?
This wasn't working, as when dragging to the start of a block list
previousClientId
isundefined
, and that's being used to get therootClientId
. TherootClientId
is used to determine the block list orientation, and so the inserter was trying to use horizontal block list styles.How?
Use the
nextClientId
to get therootClientId
whenpreviousClientId
isundefined
.Testing Instructions
Screenshots or screencast
Before
After