Skip to content

Commit 2735784

Browse files
committed
Merge branch 'issue-1057-focus-deprecated' into develop
2 parents 0b3e19b + cdb9160 commit 2735784

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assets/query-monitor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if ( window.jQuery ) {
119119
}
120120

121121
show_panel( href );
122-
$(href).focus();
122+
$(href).trigger('focus');
123123
$('#wp-admin-bar-query-monitor').removeClass('hover');
124124
e.preventDefault();
125125
};
@@ -314,7 +314,7 @@ if ( window.jQuery ) {
314314
$('#qm-' + target).find('.qm-filter').not('[data-filter="' + filter + '"]').val('').removeClass('qm-highlight').trigger('change');
315315
$('#qm-' + target).find('[data-filter="' + filter + '"]').val(value).addClass('qm-highlight').trigger('change');
316316
show_panel( '#qm-' + target );
317-
$('#qm-' + target).focus();
317+
$('#qm-' + target).trigger('focus');
318318
e.preventDefault();
319319
});
320320

@@ -599,7 +599,7 @@ if ( window.jQuery ) {
599599

600600
$('.qm-button-container-settings,a[href="#qm-settings"]').on('click',function(){
601601
show_panel( '#qm-settings' );
602-
$('#qm-settings').focus();
602+
$('#qm-settings').trigger('focus');
603603
});
604604

605605
$('.qm-button-container-position').on('click',function(){
@@ -629,7 +629,7 @@ if ( window.jQuery ) {
629629

630630
$('.qm-title-heading select').on('change',function(){
631631
show_panel( $(this).val() );
632-
$($(this).val()).focus();
632+
$($(this).val()).trigger('focus');
633633
});
634634

635635
} );

0 commit comments

Comments
 (0)