So I discovered this not-so-handy bug in Firefox today related to filling in information into a HTML form. Sometimes when the user is about to enter data, the text entry field’s cursor caret becomes invisible.
It’s a bug I’ve seen before but had just put down to my browser set-up, but today after seeing it happen on a colleague’s machine, I decided to investigate what was actually going on. It turns out I was not alone in having this problem, it is a known bug.

Basically, the problem seems to be caused by the scrolling properties of the DIV elements that an input field is contained in. There’s no z-index or cursor CSS fix - instead you need to use one of the two following solutions.
- Create a new DIV element to surround the input which has an overflow of hidden. E.g:
<div style="overflow:hidden"><input type="text" id="example" /></div>(Inline style used for demonstration - use a style sheet if you can)
- Set the CSS property position of the container DIV to fixed. E.g:
div.container { position:fixed }
So now your cursor problem is resolved.
Sure your layout’s probably screwed and needs some reworking, but at least the cursor blinks! In all seriousness, this is a decent enough workaround should you consider the problem one that has to be solved. The good news is that Firefox 3 no longer has this problem, so hopefully this is a soon to be outed gotcha.
Tags: Bug, Caret, Cursor, Disappear, Firefox, Invisible, Missing


February 27th, 2008 at 10:45 am
Interesting bug, I’m not sure I’ve encountered it. I have encountered the bug where certain inputs will fail to have spelling correction, and I believe it’s due to certain CSS properties. I haven’t experimented fully, but I have had a textarea lose the spell checking ability when certain styles were applied. Guess it could use more tinkering.
February 27th, 2008 at 7:37 pm
I haven’t encountered that one myself, but I’ll keep an eye out for it and see if I can find an answer!
March 5th, 2008 at 1:29 pm
FYI, it looks like this is fixed in Firefox 3.
September 7th, 2008 at 9:19 am
I’m having this problem with Firefox 3.