wpView: use `data-mce-selected` instead of adding a class to mark a view as selected. This prevents adding an unneeded undo level. Props avryl, fixes #28313
Built from https://develop.svn.wordpress.org/trunk@28684 git-svn-id: http://core.svn.wordpress.org/trunk@28502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d593293556
commit
60e323d911
|
@ -73,7 +73,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
|||
|
||||
deselect();
|
||||
selected = viewNode;
|
||||
dom.addClass( viewNode, 'selected' );
|
||||
dom.setAttrib( viewNode, 'data-mce-selected', 1 );
|
||||
|
||||
clipboard = dom.create( 'div', {
|
||||
'class': 'wpview-clipboard',
|
||||
|
@ -109,7 +109,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
|||
dom.remove( clipboard );
|
||||
|
||||
dom.unbind( selected, 'beforedeactivate focusin focusout click mouseup', _stop );
|
||||
dom.removeClass( selected, 'selected' );
|
||||
dom.setAttrib( selected, 'data-mce-selected', null );
|
||||
}
|
||||
|
||||
selected = null;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -231,13 +231,13 @@ audio {
|
|||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.wpview-wrap.selected {
|
||||
.wpview-wrap[data-mce-selected] {
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
border-color: rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.ie8 .wpview-wrap.selected,
|
||||
.ie7 .wpview-wrap.selected {
|
||||
.ie8 .wpview-wrap[data-mce-selected],
|
||||
.ie7 .wpview-wrap[data-mce-selected] {
|
||||
background-color: #e5e5e5;
|
||||
border-color: #777;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ audio {
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.wpview-wrap.selected .wpview-overlay {
|
||||
.wpview-wrap[data-mce-selected] .wpview-overlay {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
@ -262,7 +262,7 @@ audio {
|
|||
z-index: 100;
|
||||
}
|
||||
|
||||
.wpview-wrap.selected .toolbar {
|
||||
.wpview-wrap[data-mce-selected] .toolbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ audio {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.selected .wpview-error {
|
||||
.wpview-wrap[data-mce-selected] .wpview-error {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,6 @@ audio {
|
|||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
|
||||
.wpview-wrap .toolbar div:hover,
|
||||
#wp-image-toolbar i:hover {
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.8);
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue