mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
TinyMCE wpView: when clicking on the Edit button, move the focus back to the editor before opening the modal. This is needed for IE so TinyMCE can save the proper DOM "bookmark", and makes it possible to move the focus to the modal after it is opened.
See #30817. Built from https://develop.svn.wordpress.org/trunk@30986 git-svn-id: http://core.svn.wordpress.org/trunk@30972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b806668e71
commit
441b47b28f
@ -330,8 +330,13 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
|
||||
if ( ( event.type === 'touchend' || event.type === 'mousedown' ) && ! event.metaKey && ! event.ctrlKey ) {
|
||||
if ( editor.dom.hasClass( event.target, 'edit' ) ) {
|
||||
|
||||
// In IE need to transfer focus from the non-editable view back to the editor.
|
||||
if ( Env.ie ) {
|
||||
editor.focus();
|
||||
}
|
||||
|
||||
wp.mce.views.edit( view );
|
||||
editor.focus();
|
||||
return false;
|
||||
} else if ( editor.dom.hasClass( event.target, 'remove' ) ) {
|
||||
removeView( view );
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user