-
Notifications
You must be signed in to change notification settings - Fork 3.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
fix(android): Get fragment from text/html when application/x-slate-fragment is missing on copy-paste slate fragment in android #4433
Conversation
🦋 Changeset detectedLatest commit: 7ce5438 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
The change seems ok to me (I've recently spent some time working with DataTransfer). I think it would be beneficial to document why this exists, and why Android's paste buffer is excluding our attempt to add application/x-slate-fragment
hai @dylans thanks for the feedback. im just checking it again, and make a tweak for condition props onPaste was call preventDefault. So |
im just realize, that the cliboard data |
Im just update it to check the fragment in |
…agment is missing on copy-paste slate fragment in android (ianstormtaylor#4433) * fix(android): clipboard application/x-slate-fragment is missing on paste in android * add event onCut * add changeset * make slate fragment available when props onPaste, call preventDefault * . * get the fragment from text/html when it missing * remove setData * use getClipboardData instead of hooks
Description
application/x-slate-fragment
is missing on paste event clipbooard data. So im thingking about adding a clipboard ref for android editable to holding what user copy or cut. Then on paste event, editor can compare the ref with the even clipboard dataIssue
Fixes: #4432
Example
Context
This will hold what user copy or cut in a ref, so paste event can compare it with the event clipboardData. Use it by pass the native event clipboard.
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)yarn changeset add
.)