-
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
[RNMobile] Fix text formatting mode lost after backspace is used #37676
Conversation
# Changes Aztec reference to last commit from https://github.com/wordpress-mobile/AztecEditor-iOS/pull/1346 PR. | ||
# ONLY FOR TESTING, IT SHOULD BE DELETED ONCE THE AZTEC PR IS MERGED! | ||
pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'd68c76ec8f01490c741077dccefc17b17ce19f2d' | ||
|
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.
I updated the Aztec-iOS reference so it points to the PR (wordpress-mobile/AztecEditor-iOS#134) where the shouldRecalculateTypingAttributesOnDeleteBackward
variable was added. Once that PR is merged, we should remove the changes made to Podfile
and Podfile.lock
files.
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.
Great work @fluiddot 👍
I tested the Android implementation with a local build and it worked as expected 🎉
The code changes on the iOS side both on this PR and on Aztec LGTM but I haven't tested yet. I will have a look tomorrow if @guarani does not beat me to this 😄
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.
Tested on iOS and works as expected! ❤️ The code level changes on iOS also look good 👍
# Conflicts: # packages/react-native-editor/CHANGELOG.md # packages/react-native-editor/ios/Podfile # packages/react-native-editor/ios/Podfile.lock
Fixes #34938.
Related to:
Description
This PR fixes the issue #34938 by introducing a couple of changes in Aztec-Android and Aztec-iOS. The main purpose of the change is to prevent Aztec modifying internally the active text format when the text changes and letting the RichText component have full control over it.
NOTE: Further information about the issue and this approach can be found in this comment #34938 (comment).
How has this been tested?
iOS:
Android:
Screenshots
iOS
Kapture.2021-12-31.at.13.34.42.mp4
ios-format-backspace-fix.mp4
Android
android-format-backspace-issue.mp4
Screen_Recording_20211231-165915_Gutenberg.mp4
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).