Make WordPress Core

Ticket #25131: 25131.patch

File 25131.patch, 932 bytes (added by azaozz, 13 years ago)
  • wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

     
    228228                                o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>');
    229229                        });
    230230
     231                        // Fix bug in iOS Safari where it's impossible to type after a touchstart event on the parent document.
     232                        // Happens after zooming in or out while the keyboard is open. See #25131.
     233                        if ( tinymce.isIOS5 ) {
     234                                ed.onKeyDown.add( function() {
     235                                        if ( document.activeElement == document.body ) {
     236                                                ed.getWin().focus();
     237                                        }
     238                                });
     239                        }
     240
    231241                        ed.onSaveContent.add(function(ed, o) {
    232242                                // If editor is hidden, we just want the textarea's value to be saved
    233243                                if ( ed.isHidden() )