mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
TinyMCE: fix editor focus issues after ontouchstart event on the parent document in iOS Safari. Fixes #25131 for 3.7.
Built from https://develop.svn.wordpress.org/trunk@25132 git-svn-id: http://core.svn.wordpress.org/trunk@25112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1700a5efb1
commit
a87a1bceff
File diff suppressed because one or more lines are too long
@ -228,6 +228,16 @@
|
||||
o.content = o.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g, '<p> </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() )
|
||||
|
Loading…
Reference in New Issue
Block a user