mendixlabs / LoginForm

A custom login which can be used as an alternative to the default Mendix login page
https://appstore.home.mendix.com/link/app/87/Mendix/Login-form
Apache License 2.0
3 stars 18 forks source link

Unable to change usernames when using Casehandling #12

Closed edwinvanelk closed 8 years ago

edwinvanelk commented 8 years ago

When Casehandling is switched on, cursor is placed at the end of the username after every cursor movement or after every inserted character.

Trying to use the arrow keys to change (characters in) the username is impossible. Even selecting a single character using the mouse does not work.

mgroeneweg commented 8 years ago

Just about to report the same thing! Any update here?

edwinmp commented 8 years ago

This issue is caused by the keyup event:

on(this._userInput, "keyup", lang.hitch(this, function(e) {
     this._userInput.value = this._userInput.value.toUpperCase();
 }));

Found at: https://github.com/mendix/LoginForm/blob/master/src/LoginForm/widget/LoginForm.js#L216

Solution: Remove the keyup event. There's already a text-transform property being used to handle the case options, though its effects are only on the client side. To ensure that the transformation is passed to the server, the code to change the value to upper or lowercase should be done just before the Username is send to the server.

Will have this implemented in the next pull request.

JelteMX commented 8 years ago

Fixed in 3.5.0