-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[RN Mobile] Fix crash when merging block #15392
Conversation
Hey just a couple friendly reminders:
|
6d06bcd
to
9b93e9b
Compare
Pressing on the buttons didn't change the format of the selected text.
…/fix-crash-on-merge-2
@@ -343,6 +391,8 @@ export class RichText extends Component { | |||
if ( onRemove && empty && isReverse ) { | |||
onRemove( ! isReverse ); | |||
} | |||
|
|||
event.preventDefault(); |
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.
Does this make sense on RN?
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.
Not really indeed.
I don't think it's doing anything at the moment (it probably could if we handled it on the native side?), I just added it because I wanted the code to get closer to the RichText web version so we can merge the two in the short term.
If you find it confusing I don't mind removing it.
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.
It's ok for me, it will actually be nice that this sent something back to the native side, and then we could decide how to handle the Enter/Delete after JS processed the event.
…es won't change the format of the selected text
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.
LGTM!
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.
LGTM as well!
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.
Looks good! 🎉
This PR aims to upgrade RichText on mobile native to use the latest changes from the web, mainly those made in #14640
It also removes the customization we made to the rich-text library since writing in multiple formats at once is now stable on the web.
Testing Instructions
Tested with wordpress-mobile/gutenberg-mobile#949