--- a/wp/wp-includes/js/wp-auth-check.js Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-includes/js/wp-auth-check.js Mon Oct 14 17:39:30 2019 +0200
@@ -16,10 +16,12 @@
});
frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() );
- frame.load( function() {
+ frame.on( 'load', function() {
var height, body;
loaded = true;
+ // Remove the spinner to avoid unnecessary CPU/GPU usage.
+ form.removeClass( 'loading' );
try {
body = $(this).contents().find('body');
@@ -46,7 +48,7 @@
}
}).attr( 'src', form.data('src') );
- $('#wp-auth-check-form').append( frame );
+ form.append( frame );
}
$( 'body' ).addClass( 'modal-open' );
@@ -75,6 +77,7 @@
if ( typeof adminpage !== 'undefined' && ( adminpage === 'post-php' || adminpage === 'post-new-php' ) &&
typeof wp !== 'undefined' && wp.heartbeat ) {
+ $(document).off( 'heartbeat-tick.wp-auth-check' );
wp.heartbeat.connectNow();
}