fix dropdown persistence issue when selecting text