clear the selection when the window is resized