use node instead of selector in getCaretPos