Update deprecated jQuery functions for api-keys.js
This commit is contained in:
parent
08aa9e32eb
commit
37f7ccc1f2
|
@ -53,7 +53,7 @@
|
|||
.on( 'click', css_class, function( evt ) {
|
||||
evt.preventDefault();
|
||||
if ( ! document.queryCommandSupported( 'copy' ) ) {
|
||||
$( css_class ).parent().find( 'input' ).focus().select();
|
||||
$( css_class ).parent().find( 'input' ).trigger( 'focus' ).trigger( 'select' );
|
||||
$( '#copy-error' ).text( woocommerce_admin_api_keys.clipboard_failed );
|
||||
} else {
|
||||
$( '#copy-error' ).text( '' );
|
||||
|
@ -69,10 +69,10 @@
|
|||
'fadeIn': 50,
|
||||
'fadeOut': 50,
|
||||
'delay': 0
|
||||
} ).focus();
|
||||
} ).trigger( 'focus' );
|
||||
} )
|
||||
.on( 'aftercopyerror', css_class, function() {
|
||||
$( css_class ).parent().find( 'input' ).focus().select();
|
||||
$( css_class ).parent().find( 'input' ).trigger( 'focus' ).trigger( 'select' );
|
||||
$( '#copy-error' ).text( woocommerce_admin_api_keys.clipboard_failed );
|
||||
} );
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue