diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index ab3b9d57a80..ad207bfaaef 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {

-

+
@@ -813,33 +813,27 @@ if ( ! defined( 'ABSPATH' ) ) { jQuery( document ).ready( function( $ ) { - $( document.body ).on ( 'click', '#copy-for-support', function( e ) { - $( '#debug-report' ).find( 'textarea' ).focus().select(); - $( '#copy-error' ).text( '' ); - } ); - $( document.body ).on( 'copy', '#copy-for-support', function( e ) { - $( '#copy-error' ).text( '' ); e.clipboardData.clearData(); e.clipboardData.setData( 'text/plain', $( '#debug-report' ).find( 'textarea' ).val() ); e.preventDefault(); - } ); + }); $( document.body ).on( 'aftercopy', '#copy-for-support', function( e ) { if ( true === e.success['text/plain'] ) { - $( '#copy-error' ).text( '' ); - $( '#copy-for-support' ).tipTip( { + $( '#copy-for-support' ).tipTip({ 'attribute': 'data-tip', 'activation': 'focus', 'fadeIn': 50, 'fadeOut': 50, 'delay': 0 - } ).focus(); + }).focus(); } else { + $( '.copy-error' ).removeClass( 'hidden' ); $( '#debug-report' ).find( 'textarea' ).focus().select(); - $( '#copy-error' ).text( '' ); } - } ); - } ); + }); + + });