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

Mobile: Fixing crash caused when pasting formatted text #30676

Merged
merged 1 commit into from
Apr 9, 2021
Merged

Mobile: Fixing crash caused when pasting formatted text #30676

merged 1 commit into from
Apr 9, 2021

Conversation

illusaen
Copy link
Contributor

@illusaen illusaen commented Apr 9, 2021

This crash was happening because raw transforms were being filtered out on mobile for block transforms. This caused the hardcoded transformation from 'core/html' blocks (which pasting formatted text defaults to) to fail due to having no transforms and thus try to create a new block of type html with no block type.

GBMobile: #3359
Fixes #30672

Description

Added condition to allow all raw transformations in mobile.

How has this been tested?

  • Copy formatted text
  • Paste formatted text, see no crash
  • Paste formatted text without formatting, also see no crash.

Screenshots

Formatted
formatted.mp4

Types of changes

Bugfix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • 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 (please manually search all *.native.js files for terms that need renaming or removal).

Copy link
Member

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Great job @illusaen 👍
Tested this on a Pixel 5 with Android 11 and it works as expected 🎉
Thanks for handling this so quickly 🙇

@antonis antonis merged commit 6ede89a into WordPress:trunk Apr 9, 2021
@illusaen illusaen deleted the fix-crash-pasting-formatted-text branch April 9, 2021 16:44
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.

Mobile: Android: Pasting formatted text crashes the editor
2 participants