Make WordPress Core

Changeset 29273


Ignore:
Timestamp:
07/22/2014 09:52:02 PM (12 years ago)
Author:
azaozz
Message:

wpView: make sure the editor is focused before selecting/deselecting a view, or IE may throw an invalid range error, see #28595.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpview/plugin.js

    r29246 r29273  
    120120                }
    121121
     122                // Make sure that the editor is focused.
     123                // It is possible that the editor is not focused when the mouse event fires
     124                // without focus, the selection will not work properly.
     125                editor.getBody().focus();
     126
    122127                deselect();
    123128                selected = viewNode;
    … …  
    134139                dom.bind( clipboard, 'beforedeactivate focusin focusout', _stop );
    135140                dom.bind( selected, 'beforedeactivate focusin focusout', _stop );
    136 
    137                 // Make sure that the editor is focused.
    138                 // It is possible that the editor is not focused when the mouse event fires
    139                 // without focus, the selection will not work properly.
    140                 editor.getBody().focus();
    141141
    142142                // select the hidden div
Note: See TracChangeset for help on using the changeset viewer.