Browsers defocusing on its own

Lately I've been experiencing strange behaviors from both Firefox and Chrome. When I go to a new page, either through a link or Firefox's Live Bookmarks, the browser window becomes inactive. It's still in front of the other windows, but scrollwheel and typing actions no longer register on the browser until I click it to make it active again. Further evidence that it is defocusing is that the red X to close the window (I use Windows 7) becomes transparent like an inactive window. Also, it seems to occur randomly; I cannot recreate it, whenever it happens I try going back and click the link again (the behavior doesn't repeat itself). Something's funny about the latest versions of Firefox and Chrome; it has never done this before. What do you think is going on? Malware? Flash or some other plugin? Something dictated by the webpage?