Working on integrating editor based on prosemirror in our mobile products we've faced some critical for us issues with contenteditable=false on Android.
contenteditable=false node – which is not good for UX of an editor.contenteditable=false node.
http://codepen.io/iamsysoev/pen/ggVOeg
Since recently prosemirror automatically adds contenteditable=false https://github.com/ProseMirror/prosemirror-view/blob/master/src/viewdesc.js#L429 which breaks android in aforementioned cases.
In prosemirror 0.10 it was possible to create leaf/inline node without contenteditable=false, but any text you type after such node becomes a part of this node on Android:

I don't think it's possible to fix both these issues (since browser bug). But maybe you can come up with some workarounds for these issues. Because it's crucial for editor to have none editable nodes in somehow interact with them.
Any update on this bug?
AFAIK issue in Chromium is still open...
I solved this by using a zero-width space after the token and detecting when its deleted. I figured it out by using chrome://inspect with Quip ;)
I'm not using prosemirror btw. I build a custom editor but noticed that most editors have this problem. :/
Any update?
I experience this bug only while using the Gboard (software keyboard), I don't have this bug while using the Samsung keyboard (hardware keyboard).
@ccorcos Could you please show how you solved this issue?
I'm not using prosemirror. I wrote my own editor and am doing some magic with a zero-width space.
I solved this by using a zero-width space after the token and detecting when its deleted. I figured it out by using chrome://inspect with Quip ;)
can u share some code examples? It will help us to resolve same.
I could fix the issue with help of https://github.com/ProseMirror/prosemirror/issues/903 with:
inline: true,
group: 'inline',
selectable: true,
draggable: true,
Note that in my tests draggable and selectable had to be set to true.
toDOM(node) {
const attrs = {
contentEditable: 'false',
style: 'display:inline-block'
};
return ['span', attrs, ['span', { style: 'display:block'}, '@'+node.attrs.name] ];
},
Tested with SwiftKey and Gboard, did not test with WebViews.
Most helpful comment
I solved this by using a zero-width space after the token and detecting when its deleted. I figured it out by using chrome://inspect with Quip ;)