Make WordPress Core

Changeset 27544


Ignore:
Timestamp:
03/14/2014 08:40:44 PM (11 years ago)
Author:
wonderboymusic
Message:

MCE Views: don't (re-)render views if the format of the content is "raw" to avoid adding additional undo levels on undo/redo.

Props gcorne.
Fixes #27416.

File:
1 edited

Legend:

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

    r27408 r27544  
    141141        var body, padNode;
    142142
    143         wp.mce.views.render();
     143        // don't (re-)render views if the format of the content is raw
     144        // to avoid adding additional undo levels on undo/redo
     145        if ( event.format !== 'raw' ) {
     146            wp.mce.views.render();
     147        }
    144148
    145149        // Add padding <p> if the noneditable node is last
Note: See TracChangeset for help on using the changeset viewer.