Fix row selection in tax settings screen

This commit is contained in:
Mike Jolley 2016-01-04 11:04:52 +00:00
parent 1228ae348c
commit a70f1d7852
2 changed files with 6 additions and 5 deletions

View File

@ -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