This has been happening on my machine for quite a while, I think maybe even before 10.04. Currently I'm on 10.10 with Firefox 3.6.11.
Whatever the problem is you can stop it from happening for a while if you go just go into Edit - Preferences. I currently have it on the "Advanced Tab" just because i was thinking it was part of the spelling features, not sure if it matters. I used to turn spelling on and off but it seems all you have to do is open preferences.
Hope that helps.