Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Bug in keyboard with maxlenght option set to a value #485

Closed apod42 closed 8 years ago

apod42 commented 8 years ago

Steps to reproduce this:

  1. Use Custom:Hex keyboard on demo page
  2. Enter C D E F 8 9. At this point no more text can be entered, normal behaviour
  3. Using left arrow key move the text caret after the first letter C
  4. Enter 0 0 0 0 0
  5. See how D E F 8 9 is replaced with 0 0 0 0 0

Is this normal behaviour? Looks like a bug. On step 4 I think when I try to enter 0 0 0 0 0 nothing should happen. My original text should not get replaced.

Mottie commented 8 years ago

Hi @apod42!

There is a maxInsert option that is set to true by default. If you set it to false, the user will not be allowed to insert characters. They would have to use the backspace key to remove a character before being allowed to enter another - demo.

apod42 commented 8 years ago

Thank you! I should have read the doc more carefully..

Mottie commented 8 years ago

No problem, I know the documentation could use some improvement.