fix for mouse events in firefox, but still some buggy stuff with mouse events