Fix row selection in tax settings screen
This commit is contained in:
parent
1228ae348c
commit
a70f1d7852
|
@ -125,15 +125,16 @@ jQuery( function ( $ ) {
|
|||
});
|
||||
|
||||
var controlled = false;
|
||||
var shifted = false;
|
||||
var hasFocus = false;
|
||||
var shifted = false;
|
||||
var hasFocus = false;
|
||||
|
||||
$( document.body ).bind( 'keyup keydown', function( e ) {
|
||||
shifted = e.shiftKey; controlled = e.ctrlKey || e.metaKey;
|
||||
shifted = e.shiftKey;
|
||||
controlled = e.ctrlKey || e.metaKey;
|
||||
});
|
||||
|
||||
$( '.wc_input_table' ).on( 'focus click', 'input', function( e ) {
|
||||
var $this_table = $( this ).closest( 'table' );
|
||||
var $this_table = $( this ).closest( 'table, tbody' );
|
||||
var $this_row = $( this ).closest( 'tr' );
|
||||
|
||||
if ( ( e.type === 'focus' && hasFocus !== $this_row.index() ) || ( e.type === 'click' && $( this ).is( ':focus' ) ) ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue