-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
RichText: Removing/merging richtext should only trigger if the selection is collapsed #8651
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,4 +87,18 @@ describe( 'splitting and merging blocks', () => { | |
|
||
expect( await getEditedPostContent() ).toMatchSnapshot(); | ||
} ); | ||
|
||
it( 'Should not merge paragraphs if the selection is not collapsed', async () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have a rule but I think in general these should be lowercase. It's inconsistent now in the code though so whatever 😆 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Starting today (if I remember :P) |
||
await insertBlock( 'Paragraph' ); | ||
await page.keyboard.type( 'Foo' ); | ||
await insertBlock( 'Paragraph' ); | ||
await page.keyboard.type( 'Bar' ); | ||
|
||
await page.keyboard.down( 'Shift' ); | ||
await pressTimes( 'ArrowLeft', 3 ); | ||
await page.keyboard.up( 'Shift' ); | ||
await page.keyboard.press( 'Backspace' ); | ||
|
||
expect( await getEditedPostContent() ).toMatchSnapshot(); | ||
} ); | ||
} ); |
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.
As mentioned, it does make these specs read weirdly though.