Safari backspace bug with details tag

When using the native <details> and <summary> tags and pressing backspace within the summary, Safari removes the whole text content. Chrome and Firefox works as expected.

I created a glitch project for it: Glitch :・゚✧

Can this be a problem with ProseMirror? Probably it is a Safari thing.

CleanShot 2021-11-24 at 00.06.56

Usually it’s pretty easy to tell by just trying it in a vanilla contentEditable div in jsfiddle, codepen, etc. In trying that here you get the same thing without prosemirror which makes sense since prosemirror doesn’t really handle backspace except via a keymap. And even then it’s you choosing which commands to assign and most in the default setup are just there to intercept the key to do some special handling instead of letting the browser handle it. I’m guessing you’d need to create a custom command to manipulate the text programatically since the browser isn’t handling it well.

Yes, I have now written a workaround for Safari. Probably ProseMirror itself can’t do anything here :v: