set min-width in codemirror-line inner element effect cursor position


when i change ‘add’ to ‘addw’, the cursor changed from ‘add’ to the end.

the reason is i add min-width in cm-key


but i want the cursor near ‘addw’, not the end.
so what can i do to solve this problem ? thank you~

In principle inline elements don’t support width, so that would be ignored. But I guess you also made it display: inline-block? In any case, this isn’t supported by CodeMirror, and that kind of cursor weirdness is probably not the only problem it causes.

got it, Thank for your reply. and your right, i set all inline element to display: inline-block