Mottie/Keyboard

Still able to input characters even maxlength was reached

Closed this issue · 4 comments

When I set maxLength: 10, I was still able to input characters when the cursor was not in the end of the input text.

When I move the cursor in the beginning or any part of the input text (except the end), the keys that i'm selecting just overwrite the existing characters. Somehow it's like the function when you click Insert in a real keyboard.

Appreciate your help with this. Thanks!

Hi @kengerz!

It was intentionally set up that way so that characters could be inserted in the middle of the value.

What is it you expect/want to happen?

Hi @Mottie, what i was expecting is that when the max length was reached, the user should not be able to insert characters anymore. Is there a way that I can achieve this? Thanks.

A maxInsert option is included in 1.19.0.

// allow inserting characters @ caret when maxLength is set
maxInsert : true,

Thanks for your patience!

@Mottie Got it! Thank you very much!