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

Paste: apply active formats when pasting inline #14815

Merged
merged 1 commit into from Dec 11, 2019
Merged

Conversation

@ellatrix
Copy link
Member

ellatrix commented Apr 4, 2019

Description

Fixes #11571. When pasting inline, we should merge the formats of the pasted record with the active formats, not just insert the value without the active formats. When you paste something inline in a rich text area, you'd expect it to preserve any active formats.

How has this been tested?

See #11571.

Screenshots

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
@aduth

This comment has been minimized.

Copy link
Member

aduth commented May 22, 2019

Is this still valid?

@ellatrix

This comment has been minimized.

Copy link
Member Author

ellatrix commented May 27, 2019

Yes

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Oct 29, 2019

I wanted to review this but it looks like it needs a rebase since the code changed a lot.

@ellatrix ellatrix force-pushed the fix/paste-active-formats branch from 886b180 to 74ca7fb Dec 11, 2019
@ellatrix ellatrix changed the title RichText: Paste: merge active formats Paste: apply active formats when pasting inline Dec 11, 2019
@ellatrix ellatrix force-pushed the fix/paste-active-formats branch from 74ca7fb to 72cb5ad Dec 11, 2019
@ellatrix ellatrix merged commit f92fed7 into master Dec 11, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@ellatrix ellatrix deleted the fix/paste-active-formats branch Dec 11, 2019
@hypest

This comment has been minimized.

Copy link
Contributor

hypest commented Dec 16, 2019

Looks like onPaste adopted a new param (https://github.com/WordPress/gutenberg/pull/14815/files#diff-7839cf8eb81c9e32fb18ba285a50e027R125) but the PR is not updating the native mobile codepath to provide the param in the call sites, leading to crash.

@hypest

This comment has been minimized.

Copy link
Contributor

hypest commented Dec 17, 2019

PR is up to fix the regression: #19190

@hypest hypest mentioned this pull request Dec 17, 2019
2 of 2 tasks complete
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.