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. git-svn-id: https://develop.svn.wordpress.org/trunk@30986 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5f1ad2d768
commit
8298e94bfe
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user