Fix panning/zooming on firefox and safari.