A computer mouse can act erratically when it is dirty. Therefore, make sure to clean your mouse regularly.