removed document listener when setting text selected from the the popup