Added attribute to stay on current window on resize and callback before snapping.