state disappears when you drag to right edge