fix cross browser issues with mouse positioning