https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111984

Revision: 111984
Author:   tstarling
Date:     2012-02-20 23:47:47 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
Bug 34538 again. Bug reproduced and fix tested.

Modified Paths:
--------------
    trunk/phase3/resources/mediawiki.special/mediawiki.special.changeemail.js

Modified: 
trunk/phase3/resources/mediawiki.special/mediawiki.special.changeemail.js
===================================================================
--- trunk/phase3/resources/mediawiki.special/mediawiki.special.changeemail.js   
2012-02-20 23:29:47 UTC (rev 111983)
+++ trunk/phase3/resources/mediawiki.special/mediawiki.special.changeemail.js   
2012-02-20 23:47:47 UTC (rev 111984)
@@ -24,16 +24,18 @@
        }
 };
 
-// Lame tip to let user know if its email is valid. See bug 22449
-// Only bind once for 'blur' so that the user can fill it in without errors
-// After that look at every keypress for direct feedback if it was invalid 
onblur
-$( '#wpNewEmail' ).one( 'blur', function() {
-       if ( $( '#mw-emailaddress-validity' ).length === 0 ) {
-               $(this).after( '<label for="wpNewEmail" 
id="mw-emailaddress-validity"></label>' );
-       }
-       updateMailValidityLabel( $(this).val() );
-       $(this).keyup( function() {
+$( document ).ready( function() {
+       // Lame tip to let user know if its email is valid. See bug 22449
+       // Only bind once for 'blur' so that the user can fill it in without 
errors
+       // After that look at every keypress for direct feedback if it was 
invalid onblur
+       $( '#wpNewEmail' ).one( 'blur', function() {
+               if ( $( '#mw-emailaddress-validity' ).length === 0 ) {
+                       $(this).after( '<label for="wpNewEmail" 
id="mw-emailaddress-validity"></label>' );
+               }
                updateMailValidityLabel( $(this).val() );
+               $(this).keyup( function() {
+                       updateMailValidityLabel( $(this).val() );
+               } );
        } );
 } );
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to