For the last few weeks I’d noticed that, while I was browsing with Firefox, I’d sometimes switch back to a tab and find that it had mysteriously had its zoom setting changed. Sometimes it was really subtle, only going up or down by one level, but other times text was expanded to screen-filling sizes. It took me a while to diagnose why it was happening, but I eventually figured out it was because I was scrolling up or down, using my laptop’s touchpad’s scroll bit (I don’t think there’s a technical name for it), and then immediately opening a new tab with “Ctrl + T”. Because of the way scrolling seems to work on Ubuntu, or at least the way it does on my laptop, gently moving my finger moves up or down a few lines, but a fast stroke moves several tens of lines at a time, and it will still move by this set amount of lines even if I remove my finger as it’s still moving. What I was doing was pressing “Ctrl + T” while this scrolling was still happening, but being oblivious to it because the page had already reached the top or bottom of the screen. I was of course doing this by holding down “Ctrl” first, then tapping “T”, but “Ctrl + mouse-wheel up” (or down) zooms in (or out), which is why, after I switched back to the original tab, it would sometimes be zoomed in or out, because I’d accidental done this. I don’t know whether this is a Ubuntu specific problem or whether it also happens in other Linux distros, or indeed, in Windows or OS X. But, if you’re using something else and you have the same symptoms, just try to do what I describe above and you’ll soon know if you have the exact same problem. If you do, there’s a very easy fix, as long as you don’t mind losing the “Ctrl + mouse-wheel up” (or down) short-cut (which I don’t, because I’ve always used “Ctrl + +” and “Ctrl + -” instead): Open up Firefox’s config page, by opening a new tab and typing “about:config” (without quotes) into the address bar and pressing return, then in the “Filter” box at the top enter “mousewheel.withcontrolkey.action”. Double click on the preference that shows up (there should only be one), and replace the “3” with a “0”, then press “OK”. And that’s it. Now, moving the mouse-wheel, or using a touchpad’s scrolling bit, while holding down the “Ctrl” key, will just scroll the page the same as if you weren’t holding down “Ctrl”, so accidental zooming is a thing of the past!
Edit: This bug report explains in detail the reasons behind the problem I was having.