WordPress.org

Make WordPress Core

Changeset 25187


Ignore:
Timestamp:
08/30/2013 05:43:18 PM (5 years ago)
Author:
azaozz
Message:

TinyMCE: fix editor focus issues after ontouchstart event on the parent document in iOS Safari. Fixes #25131 for 3.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

    r24215 r25187  
    228228                o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p>&nbsp;</p>');
    229229            });
     230
     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            }
    230240
    231241            ed.onSaveContent.add(function(ed, o) {
Note: See TracChangeset for help on using the changeset viewer.