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: Pasting a file when file pasting is preferred #8936

Merged
merged 1 commit into from Mar 29, 2023
Merged

Conversation

logseq-cldwalker
Copy link
Collaborator

@logseq-cldwalker logseq-cldwalker commented Mar 28, 2023

Fixes #8926 . This bug was accidentally introduced in #8815. To QA, enable the file pasting config, copy an image from html like https://user-images.githubusercontent.com/38045018/228234385-cbbcc6b2-1168-40da-ab3e-1e506edd5fce.png. Paste should create an asset

Also remove unused mocks in formatted paste and clean up
editor-on-paste!
Copy link
Contributor

@tiensonqin tiensonqin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@@ -139,3 +137,21 @@
#js {:clipboardData #js {:getData (constantly clipboard)}})]
(is (= expected-paste result))
(reset)))))

(deftest-async editor-on-paste-with-file-pasting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Collaborator

@andelf andelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andelf andelf merged commit 07a3adc into master Mar 29, 2023
6 checks passed
@andelf andelf deleted the fix/paste-files branch March 29, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting invalid: Paste the picture and save it locally
3 participants