In Firefox, with drawSelection
enabled, if the editor is scrolled and the mouse pointer is not moving, the cursor stops blinking. Steps to reproduce:
- In Firefox, go to Try CodeMirror
- Scroll the editor on the right-hand side down a little
- Place the cursor and stop moving the mouse. After a short time, the cursor will stop blinking.
I’ve seen this in Firefox on Linux and Windows, so it seems likely it affects Mac as well.
I strongly suspect this is a Firefox bug with CSS animation, which (judging by browser bug trackers) seems a bountiful source of bugs in all browsers (see also Use opacity instead of visibility for cursor blink animation by hubgit · Pull Request #37 · codemirror/view · GitHub). I couldn’t find another property to animate that didn’t cause performance issues in Chrome, so am working around this by blinking the cursor the old-fashioned way, i.e. with a setInterval
.