Fix to lock the snap position on window resize.