Skip to content

Commit

Permalink
Media modal: make sure the Close button is focused after attempting t…
Browse files Browse the repository at this point in the history
…o close the onscreen keyboard on touch devices. Props celloexpressions, fixes #29166.

Built from https://develop.svn.wordpress.org/trunk@29473


git-svn-id: http://core.svn.wordpress.org/trunk@29251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
azaozz committed Aug 12, 2014
1 parent d45cde5 commit ce14155
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion wp-includes/js/media-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -3257,6 +3257,8 @@
}
}

$el.find( '.media-modal-close' ).focus();

return this.propagate('open');
},

Expand Down
Loading

0 comments on commit ce14155

Please sign in to comment.