fixed mouse handling on firefox