Let users type their username for 1 s during registration before barking
authorFederico Leva <federicoleva@tiscali.it>
Fri, 7 Nov 2014 08:12:49 +0000 (09:12 +0100)
committerOri.livneh <ori@wikimedia.org>
Fri, 7 Nov 2014 08:33:47 +0000 (08:33 +0000)
250 ms are not enough to finish typing your username and the warnings on
the username not being available are fully relevant only when you're done
typing, while being actively harmful if you're still typing an actually
valid name.

We should wait as much as possible, as long as most users are given the
warning before submitting the form.

Bug: 71744
Change-Id: I646d76d2b29b8049c4464f156320d32ea4bd207a

resources/src/mediawiki.special/mediawiki.special.userlogin.signup.js

index 68d3f61..a32a790 100644 (file)
                        } );
                }
 
-               $input.on( events, $.debounce( 250, updateUsernameStatus ) );
+               $input.on( events, $.debounce( 1000, updateUsernameStatus ) );
        } );
 }( mediaWiki, jQuery ) );