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

Fixes pasting in heading blocks. #675

Merged
merged 7 commits into from
Mar 5, 2019

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Feb 26, 2019

Description:

Fixes pasting in header blocks, when the paste operation would result in a block split.

Details:

In order to achieve this I copied the splitting code from the paragraph block into the heading block.

There's a chance to unify code there, but I have purposely not stepped into that, as we would need to make sure all blocks that use rich text can use the same code (title?), or find a solution that would let us customize it for some blocks (this is probably what we'd want to do).

Related PRs:

Gutenberg PR: WordPress/gutenberg#14118

Testing:

  1. Copy two paragraphs of text.
  2. Paste them into a header block.

@diegoreymendez diegoreymendez added the [Type] Bug Something isn't working label Feb 26, 2019
@diegoreymendez diegoreymendez added this to the Beta milestone Feb 26, 2019
@diegoreymendez diegoreymendez self-assigned this Feb 26, 2019
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great on iOS.

@daniloercoli
Copy link
Contributor

Sorry @diegoreymendez if the review process took so long.
I've left a comment in the companion PR, since there seems to be a small issue (easy to fix).

@diegoreymendez
Copy link
Contributor Author

@daniloercoli - No worries!

This is ready for another look.

Copy link
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected!

Copy link
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@diegoreymendez diegoreymendez merged commit eed51b6 into develop Mar 5, 2019
@diegoreymendez diegoreymendez deleted the issue/624-fix-pasting-in-header branch March 5, 2019 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants