Skip to content
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(core): fix issue with pasting mixed content (files and text) for PT-input #6924

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

skogsmaskin
Copy link
Member

@skogsmaskin skogsmaskin commented Jun 13, 2024

Description

If we have html and text on the clipboard, don't include any files into the pasted content.

Word is putting a preview image of the text on the clipboard for instance, when you copy text from the application.

If the intention is to paste a an image or file, there will be no text and html version on the clipboard as far as I can tell, testing different scenarios on my machine (Mac).

What to review

That this assumption holds water.

Testing

Notes for release

Fix issue where a text preview image would be included into the Portable Text input, when pasting text from Word.

…pt-input

If we have html and text on the clipboard, don't include any files.
Word is putting a preview image of the text on the clipboard for instance.

If the intention is to paste a an image or file, there will be no text and
html version on the clipboard.
@skogsmaskin skogsmaskin requested a review from a team as a code owner June 13, 2024 09:36
@skogsmaskin skogsmaskin requested review from pedrobonamin and removed request for a team June 13, 2024 09:36
Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 9:39am
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 9:39am
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 9:39am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 9:39am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 9:39am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Jun 13, 2024 9:39am

@skogsmaskin skogsmaskin requested review from sjelfull and removed request for pedrobonamin June 13, 2024 09:37
Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Jun 13, 2024 9:46 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 38s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 25s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 8s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 43s 2 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 14s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 29s 12 0 0

@skogsmaskin skogsmaskin added this pull request to the merge queue Jun 13, 2024
Merged via the queue into next with commit 911ebfd Jun 13, 2024
45 checks passed
@skogsmaskin skogsmaskin deleted the fix/pt-input-paste-mixed-content branch June 13, 2024 10:45
juice49 pushed a commit that referenced this pull request Jun 13, 2024
…pt-input (#6924)

If we have html and text on the clipboard, don't include any files.
Word is putting a preview image of the text on the clipboard for instance.

If the intention is to paste a an image or file, there will be no text and
html version on the clipboard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants