BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Custom blocks don't cut-paste properly

Open superkelvint opened this issue 1 year ago • 5 comments

Describe the bug When cutting-pasting custom blocks, unexpected behavior happens.

In the case of the custom alert block from https://www.blocknotejs.org/docs/custom-schemas/custom-blocks, the alert box seems to disappear. In other cases, indeterminate behavior happens.

Copying and pasting seems to work. Its cutting and pasting that doesn't.

To Reproduce Please watch the screencast here: https://share.vidyard.com/watch/x2VNexUuFWMZy2X7kLc7ym

Basically, select the custom block, then "ctrl-x", "ctrl-v".

superkelvint avatar Jun 06 '24 01:06 superkelvint

Actually, with another custom block i was building, copying/pasting didn't work either.

superkelvint avatar Jun 06 '24 02:06 superkelvint

Thanks. I can't reproduce the issue in the video on Chrome Mac OS. Which browser are you using?

Also, curious to hear what you're building!

YousefED avatar Jun 06 '24 07:06 YousefED

Managed to reproduce on Chrome:

https://github.com/TypeCellOS/BlockNote/assets/50169049/20b3b2ca-056a-4b95-a711-14ed5bcdfe6f

Seems super flaky though, could only do it on a fresh reload of the page

matthewlipski avatar Jun 11 '24 13:06 matthewlipski

I'm using Chrome 122 on Ubuntu Linux.

On Thu, Jun 6, 2024 at 12:50 AM Yousef @.***> wrote:

Thanks. I can't reproduce the issue in the video on Chrome Mac OS. Which browser are you using?

Also, curious to hear what you're building!

— Reply to this email directly, view it on GitHub https://github.com/TypeCellOS/BlockNote/issues/813#issuecomment-2151628709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBLXPJXD2GFXBMPAXLIULZGAIELAVCNFSM6AAAAABI3X62QWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJRGYZDQNZQHE . You are receiving this because you authored the thread.Message ID: @.***>

superkelvint avatar Jun 11 '24 19:06 superkelvint

The issue is even more weird. If you copy the blocks and paste them, it works as expected. And then if you cut and paste those blocks, IT WORKS.

But if you cut-paste the first time, it doesn't. But when a block/group of blocks have been already copy-pasted, then cut-paste seem to work.

https://github.com/TypeCellOS/BlockNote/assets/113965202/9cfe579a-d05b-4abf-8453-e552ea0eea2a

thedevangvishnu avatar Jun 25 '24 12:06 thedevangvishnu