mirror of
git://develop.git.wordpress.org/
synced 2025-02-26 09:33:46 +01:00
Mobile: hide the onscreen keyboard when the media modal opens, fixes #28549.
git-svn-id: https://develop.svn.wordpress.org/trunk@29369 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
05bb106161
commit
daf4baf3ed
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user