Media modal: make sure the Close button is focused after attempting to close the onscreen keyboard on touch devices. Props celloexpressions, fixes #29166.

git-svn-id: https://develop.svn.wordpress.org/trunk@29473 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-12 21:57:43 +00:00
parent 72ca5be593
commit ecfee74ce2
1 changed files with 3 additions and 1 deletions

View File

@ -3243,7 +3243,7 @@
// Disable page scrolling.
$( 'body' ).addClass( 'modal-open' );
$el.show().find( '.media-modal-close' ).focus();
$el.show();
// Try to close the onscreen keyboard
if ( 'ontouchend' in document ) {
@ -3257,6 +3257,8 @@
}
}
$el.find( '.media-modal-close' ).focus();
return this.propagate('open');
},