Mottie/Keyboard

Cursor is not moved to the end when text-input already has a value

mrumpf opened this issue · 2 comments

I'm not sure whether this is a bug or a feature, but when the text input has some default text "foobar" and the keyboard is shown, the text is taken over fine, but the cursor is placed in front of the first letter.
"|foobar".
This behavior is quite inconvenient as in usage scenarios where the keyboard is used (touch) it is often hard to place the cursor at the right position.
there should be a property which controls where the cursor will be set: cursorPosition: BEGIN, #pos, END
And "END" might be a good default.

Another option would be to select the whole value when the keyboard is displayed.

I just added a caretToEnd option in version 1.16. Maybe that will suffice?

I thought about added an option to select all content, but I've already covered that in issue #25. I guess it wouldn't hurt to add it as an option as well. I'll think about adding it in a future version.

I'm guessing this enhancement request has been resolved with the addition of that new option, so I'm closing this issue. If this option doesn't work for you, I am open to ideas :)

Thanks again for your suggestion!