Merge pull request #18349 from woocommerce/fix/18287

Focus on inputs when clicked instead of sorting
This commit is contained in:
Mike Jolley 2018-01-05 15:11:50 +00:00 committed by GitHub
commit 6956f128cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ jQuery( function ( $ ) {
ui.item.removeAttr( 'style' );
}
});
// Focus on inputs within the table if clicked instead of trying to sort.
$( '.wc_input_table.sortable tbody input' ).on( 'click', function() {
$( this ).focus();
} );
$( '.wc_input_table .remove_rows' ).click( function() {
var $tbody = $( this ).closest( '.wc_input_table' ).find( 'tbody' );