Corrected handling of mouse events in firefox