Skip to content

Fix mobile paste crash by adding activeFormats for onPaste call#19190

Merged
ellatrix merged 1 commit intomasterfrom
rnmobile/fix-crash-on-paste-issue-14815
Dec 17, 2019
Merged

Fix mobile paste crash by adding activeFormats for onPaste call#19190
ellatrix merged 1 commit intomasterfrom
rnmobile/fix-crash-on-paste-issue-14815

Conversation

@cameronvoell
Copy link
Copy Markdown
Member

Description

Fixes wordpress-mobile/gutenberg-mobile#1687

How has this been tested?

  1. Checkout gutenberg-mobile master, and gutenberg master commit f92fed7 and run the example app.
  2. Copy and paste text within a paragraph block.
  3. Note the crash with error undefined (evaluating activeFormats.length)
  4. Apply changes from this PR and rerun example app
  5. Note copy and paste now works
  6. Note test case from Paste: apply active formats when pasting inline #14815 works as well, seen in video below.

Screenshots

fix-link-paste-style

Checklist:

  • [ X ] 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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@mkevins
Copy link
Copy Markdown
Contributor

mkevins commented Dec 17, 2019

Nice fix! Maybe we can add one more default [] here: https://github.com/WordPress/gutenberg/pull/19190/files#diff-dda065334d6da1eb4149443ac3439f7eR119 to guard against future breakages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash on paste caused by Gutenberg #14815

4 participants