modified get textarea cursor position