Merge pull request #16339 from ragulka/modal-content-focus

Focus on modal content instead of container
This commit is contained in:
Mike Jolley 2017-08-07 16:46:05 +01:00 committed by GitHub
commit 43b78bac02
1 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@
render: function() {
var template = wp.template( this._target );
this.$el.attr( 'tabindex' , '0' ).append(
this.$el.append(
template( this._string )
);
@ -88,7 +88,8 @@
}).append( this.$el );
this.resizeContent();
this.$el.focus();
this.$( '.wc-backbone-modal-content' ).attr( 'tabindex' , '0' ).focus();
$( document.body ).trigger( 'init_tooltips' );
$( document.body ).trigger( 'wc_backbone_modal_loaded', this._target );