As mentioned in my previous post, we’re developing an extension that conditionally adds a decorator widget to empty lines. However, when we began to roll this out, we noticed a bug that is strangely only affecting users on Android.
Our extension appends an absolutely positioned element to empty lines.
On iOS Safari and Chrome/FF on desktop, this works just fine. However, when using the app on Android (Chrome), we’re encountering a bug that prevents you from deleting an empty line via backspace (instead of removing the line, the virtual keyboard just closes and nothing is deleted). It also prevents you from selecting an empty line in the first place (the touch events just seem to be ignored and the cursor does not move).
I’ve put together a minimal repro in this repl (which is hosted here):
Let me know if this really is a bug in CodeMirror or if there is some workaround. Alternatively, if we’re doing something wrong here, I would love to hear your thoughts on what you think the best approach is for overlaying an element over a line in a way that doesn’t conflict with its content or interfere with editing.