Fix for selectionStart == 0
add test to test insert at caret with empty textarea