]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
WordPress 3.6.1
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wordpress / editor_plugin_src.js
index 653eb7c8b2e08bbfb0b236ae8f33be52224acee4..13eae82d1a1d92b01a3bb38bdb6aac9b2ed750f4 100644 (file)
                                o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>');
                        });
 
+                       // Fix bug in iOS Safari where it's impossible to type after a touchstart event on the parent document.
+                       // Happens after zooming in or out while the keyboard is open. See #25131.
+                       if ( tinymce.isIOS5 ) {
+                               ed.onKeyDown.add( function() {
+                                       if ( document.activeElement == document.body ) {
+                                               ed.getWin().focus();
+                                       }
+                               });
+                       }
+
                        ed.onSaveContent.add(function(ed, o) {
                                // If editor is hidden, we just want the textarea's value to be saved
                                if ( ed.isHidden() )