When using keyboard composition with spanish keyboards in MacOS, after the composition ends it does not remove the leftover characters. Composition is used to create accented characters for example. This only happens if you override handleTextInput handler from prosemirror. I have an example you can look at to try spanish composition inputs on. Let me know what you think. If there is a better way to deal with doing this sort of action on our end we would like that too.
My co-worker made this demo: prosemirror-accented-demo