Mottie / Keyboard

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

{sign} key does not move caret at the end #607

Closed chepseskaf closed 7 years ago

chepseskaf commented 7 years ago

Hi,

I've found that the {sign} key insert minus character but move caret backward from 1 character too. I try to move caret on validate callback but I found the same issue that https://github.com/Mottie/Keyboard/issues/450.

Please see a demo https://jsfiddle.net/chepseskaf/x7ueqmc8/2/

Regards,

Mottie commented 7 years ago

Hi @chepseskaf!

Thanks for letting me know! I'll have it fixed in the next update.

As for the move caret function, it should target the input and not the keyboard (demo):

validate: function(keyboard, value, isClosing) {
        $.keyboard.caret(keyboard.$preview, 'end');
  return true;
}

But you shouldn't need this code to position the caret once I fix the issue.