Make WordPress Core

Changeset 32140


Ignore:
Timestamp:
04/18/2015 08:47:04 PM (10 years ago)
Author:
azaozz
Message:

TinyMCE wpView:

  • Remove selected views when inserting content but not when loading all content.
  • Remove the ref. to the selected view node on resetting the views.

Fixes #31998.

File:
1 edited

Legend:

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

    r32022 r32140  
    183183        }
    184184
    185         if ( selected ) {
    186             removeView( selected );
    187         }
    188 
    189185        if ( ! event.load ) {
     186            if ( selected ) {
     187                removeView( selected );
     188            }
     189
    190190            node = editor.selection.getNode();
    191191
     
    362362        // Remove marker attributes
    363363        $( 'p[data-wpview-marker]', rootNode ).attr( 'data-wpview-marker', null );
     364
     365        // Reset the selected node if any
     366        selected = null;
    364367    }
    365368
Note: See TracChangeset for help on using the changeset viewer.