Closed tobiasandersen closed 6 years ago
I feel like this may be because of different types of selections. When you select text, that's native. While clicking void block that's something else, which causes this bug. I think...
In our case, it was possible to "bypass" this by doing a custom copy/paste handler... a bit annoying but it was the only solution we found.
Would love to see a snippet @zGrav - I think it might be a valid solution for Slate core (since void blocks are special case either way) - or at least as a patch in my code...
@dmitrizzle https://gist.github.com/zGrav/440fdbe83d7eca8455362ccfd2e58662
This is a PoC plugin , and might not be 100% functional :D
Thank you!
This is a bug which has been there for long as I can remember. It would be wonderful to get this fixed properly!
Do you want to request a feature or report a bug?
Bug
What's the current behavior?
If you select a single void block, and press cmd+c (mac) to copy, and then try to paste it somewhere, it won't be pasted. However, it works if it's part of a larger selection range.
To reproduce: Go to http://slatejs.org/#/images, click the image (which should highlight that it's selected), press cmd+c and try to paste it somewhere.
I'm on Chrome Version 62.0.3202.94 (Official Build) (64-bit) on mac.