Caret may be undefined if input isnt visible