-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: convert clip data into plain text before pasting to omnibar #1105
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
fix: convert clip data into plain text before pasting to omnibar #1105
Conversation
By overriding onTextContextMenuItem in EditText.
|
Thanks, we will take a look as soon as possible. |
malmstein
left a comment
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.
Thanks for the submission @hotchemi. This is indeed very helpful and fixes an issue, good job!
On the actual code:
- How do you feel about not using extension functions? We don't really need this feature anywhere else and I'd prefer if the
convertClipToPlainTextfunction would only be known to theKeyboardEditText - On the naming of the
EditTextitself, we are working on a few things internally that will change its behavior, so it's better not to change anything else just yet.
|
@malmstein Thank you for the quick review!
|
|
@hotchemi thanks for clarifying, I completely missed the Thanks for the contribution! |
malmstein
left a comment
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.
Happy with the changes because the extension functions are private to the View
![]()
|
Thank you so much for your review😄🙏 |
Task/Issue URL: #1074
Description:
KeyboardAwareEditTextto be aware of pasting text from the clipboard and clear its style beforehand.ClipboardManager.convertClipToPlainText)Discussion
KeyboardAwareEditTexthas kind of two responsibilities and I was thinking I should rename the class asOmniToolbarEditTextor something, but since this is my 1st PR as an external contributor I'd like to keep the diff smaller as much as I can. Let me know your thoughts around here🙏Steps to test this PR:
Screenshots
API level >= M
API level < M
Internal references:
Software Engineering Expectations
Technical Design Template