get the cursor position in textarea or input elements