Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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] [Embed block] Detect when an embeddable URL is pasted into an empty paragraph #35204
[RNMobile] [Embed block] Detect when an embeddable URL is pasted into an empty paragraph #35204
Changes from 26 commits
8e7ae99
3df07fa
1010372
4130c4b
1739f62
e8854be
7390971
1b41af9
8f38899
be43155
579def2
eaec369
00a4f9d
74da669
7975a76
0334b75
b961e49
6cd4591
9d3a548
f59cff0
b508ae8
9e14dd3
6752e72
e0ce9a3
cf9d168
9b8a322
7d22100
1683920
b5174f3
f3f4603
5eadfc9
a6e9141
5a15e99
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 think we should preserve this line to be executed (if the conditions of line 448 are satisfied) because it's used in the
pasteHandler
call below. Maybe this has to do with the issue you encountered in this 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.
Oh yes. Good eye!
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.
On Android, this logic fails because it is not resolving the pasted URL as a block. The content that is parsed by the
PasteHandler
is a string. Further details on the differences in the clipboard behavior as expounded on this comment #35204 (comment) refactoring to accommodate this case.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 think we should handle the else case of this
if
block, probably we could call the same as in line 504:This way if we copy, for example, a Heading block that contains an URL, it will paste that block.
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.
@carlosgprim we may have to tag-team on resolving the final Heading block issue with the Embed Paste URL. This is what is taking place.
There are cases where copying a URL from a Heading block results in a string when pasted instead of being pasted as a block when it’s processed by the PasteHandler therefore the bottom sheet is still shown. I am not sure how we can figure out the source of the copy/paste if only a string is returned. Still investigating.