payload icon indicating copy to clipboard operation
payload copied to clipboard

Entire site sometimes turns blank when editing rich text

Open AlessioGr opened this issue 3 years ago • 1 comments

Bug Report

This just happened to me while editing rich text (I just typed a letter): image image

I don't know why, it happens seemingly randomly. It's quite annoying as I have to reload the page to fix it - losing all unsaved progress.

I cannot reproduce it, but maybe the console error already helps you. I'll add to this issue here when I can reliably reproduce it (or maybe others are having the same issue)

AlessioGr avatar May 18 '22 17:05 AlessioGr

Hey @AlessioGr — we've seen this once or twice as well and typically it has to do with either a custom SlateJS element or leaf, OR it could have to do with a specific data structure that is currently saved within your document.

Next time this happens, would you mind sharing exactly what you were doing before it happened? Specifically, what element or leaf you were using?

jmikrut avatar May 23 '22 21:05 jmikrut

For me whenever i try to use that HR in the text editor it shows a blank screen and some slate errors in the console... Capture-2

Tapiwachin avatar Aug 01 '22 08:08 Tapiwachin

@Tapiwachin — really? I can't reproduce that. Can you reproduce with the Payload demo?

https://demo.payloadcms.com/

jmikrut avatar Aug 01 '22 12:08 jmikrut

@Tapiwachin — really? I can't reproduce that. Can you reproduce with the Payload demo?

https://demo.payloadcms.com/

No, demo seems to be fine. I repurposed collections from here https://medium.com/trbl/building-a-professionally-designed-website-episode-4-heroes-layout-building-blocks-animations-6e819b1a5bba onto the latest payload version. Maybe there is something that i have missed.

Tapiwachin avatar Aug 01 '22 13:08 Tapiwachin

Hey @AlessioGr — we've seen this once or twice as well and typically it has to do with either a custom SlateJS element or leaf, OR it could have to do with a specific data structure that is currently saved within your document.

Next time this happens, would you mind sharing exactly what you were doing before it happened? Specifically, what element or leaf you were using?

It happened again! I've recorded it here: https://youtu.be/VfD3iK5Cl2I

Edit: it seems in this example, a bit of image data was copied into the clipboard as well

AlessioGr avatar Aug 05 '22 14:08 AlessioGr

Hey @AlessioGr — thank you very much for the video! I was able to reproduce. I had to go to the URL in your video and copy / paste a similar piece of content as you to reproduce, but that led me to a few improvements that we could make to the rich text editor copy / paste HTML deserializing.

This will be released in our next patch version, possibly later tonight but definitely within the next 24hr or so!

jmikrut avatar Aug 16 '22 01:08 jmikrut