[Fix] wrong startPos calculation when popup dialog