What is going on inside the button
Under each mouse button is a microswitch: a small metal leaf spring that snaps against a contact when pressed. New, the snap is clean. As the spring wears, or as the contact surface oxidises, the leaf bounces on landing and the contact makes, breaks, and makes again in a couple of milliseconds. The mouse firmware is supposed to ignore that bounce with a debounce delay, but the delay is tuned for a new switch and a worn one bounces longer. One of those extra makes gets through, and you have two clicks.
Cheap and expensive mice both do it; the difference is mostly how many clicks the switch is rated for. It arrives sooner on mice that have been drag clicked or butterfly clicked, because both techniques are essentially controlled bouncing.
Confirming it
The double click test logs the gap between consecutive clicks on each button. Click slowly, once a second, twenty or thirty times. Any pair of clicks under 80 ms apart when you only pressed once is the switch. One in thirty could be a slip of the finger; five in thirty is a diagnosis. Test left, right and middle separately; the left dies first because it works hardest.
Fixes, cheapest first
- Software debounce. Some manufacturers' mouse software has a "click delay", "debounce time" or "double click prevention" setting. Raising it from the default (often 4 to 8 ms) to 12 or 16 ms swallows most bounces. It also adds that many milliseconds to every click, which you won't notice outside of competitive games.
- Air and contact cleaner. Compressed air into the seam around the button sometimes clears a bounce caused by dust. Contact cleaner sprayed into the switch through the gap is a bit more effective and a bit more risky. Either can buy a few months.
- The spring trick. Opening the switch and re-tensioning the leaf spring is a well-documented repair. It works for a while, takes fine tweezers and patience, and the spring can ping off into another dimension. Search the switch type (usually printed on the top of the switch) plus "spring fix".
- A new switch. The proper fix. Switches cost a dollar or two; the job is two solder joints, or none on the few mice with socketed switches. If you're replacing one, replace both main switches, and consider an optical switch mouse next time: no contacts, nothing to bounce.
While you wait
Windows has a double-click speed slider in the mouse settings; setting it to the fastest setting means two clicks need to be very close to register as a double click, which hides some of the problem for file browsing. It does nothing for games, where every click is separate. Macs have the same slider under Mouse in system settings.
Bonus diagnosis: if it's the wheel that misbehaves rather than the buttons, the page jumping back a line while you scroll, that's a different part, and the scroll wheel test catches it.