Caret position in pixels for <input type="text"> and textarea elements