Fix various issues with firefox panning