added Mr Lee's changes in elm_popup