Multiple issues with character based annotation

Thanks for the report!

I'll look into that! I remember there being some inconsistencies between how Chrome and Firefox handle highlighting with trailing whitespace, but from what I remember, Firefox was actually most consistent here. Does this only occur with characters that are followed by actual whitespace?

Do you have an example text that shows the problem? I've been trying to reproduce this but I can't seem to make the UI produce this type ouf output or zero-length spans :thinking:

That's going to be tricky to work around and I don't have a perfect solution for this at the moment. One idea could be to add some spacing around the main text container (.prodigy-spans) to give you more space for your cursor. You could also try this out by using global_css and adding some padding on the left.

That's definitely a bug, thanks! Zero-character spans shouldn't be valid, so we'll fix this to prevent them from being locked in.

This wouldn't really work. If you're training a model that predicts token-based tags, e.g. a named entity recognizer, the spans you provide need to map to valid tokens. So it doesn't really make sense to annotate characters here because you'll very easily end up with spans that the model can't learn from.