Mobile: hide the onscreen keyboard when the media modal opens, fixes #28549.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-03 22:34:16 +00:00
parent 27890cc734
commit 42c8135fac
2 changed files with 12 additions and 12 deletions

View File

@ -1048,22 +1048,22 @@
* @returns {wp.media.view.MediaFrame}
*/
open: function( id, options ) {
var workflow;
var workflow, focusTrap;
if ( 'ontouchend' in document ) {
// Close the onscreen keyboard
if ( ! focusTrap ) {
focusTrap = $( '<input type="text" />' );
}
$( document.body ).append( focusTrap );
focusTrap.focus().blur().remove();
}
options = options || {};
id = this.id( id );
/*
// Save a bookmark of the caret position in IE.
if ( ! _.isUndefined( window.tinymce ) ) {
editor = tinymce.get( id );
if ( tinymce.isIE && editor && ! editor.isHidden() ) {
editor.focus();
editor.windowManager.insertimagebookmark = editor.selection.getBookmark();
}
}
*/
workflow = this.get( id );
// Redo workflow if state has changed

File diff suppressed because one or more lines are too long