While making my menu, I’ve noticed that the selected text will disappear as soon as click anywhere outside the document (which my menu is). So if I have a dropdown of headers for example, clicking on the dropdown will unselect my text (though the prosemirror selection will stay). This makes it unclear what will happen when I style the text, i.e. which text is currently selected.
This is browser behavior and consistent across all web editors, most of them have a hack that highlights the selection manually, e.g. see Google Docs: http://recordit.co/Ux1Ja1riAc
I wrote a simple plugin to automate this process for prosemirror, but the new transaction system is not quite as explicit about when the selection is changed so I would like some feedback.
This functionality might be good to implement into prosemirror main but I’m happy to publish it as a plugin as well if other people have similar problems.