Skip to content
Permalink
Browse files

Merge branch 't/11149' into major

  • Loading branch information...
oleq committed Nov 13, 2013
2 parents ed68fde + 5fe814b commit a686269c19b2c0cd0927b00f4165d38a9ee7bb77
Showing with 15 additions and 10 deletions.
  1. +15 −10 plugins/magicline/plugin.js
@@ -277,16 +277,21 @@

// Revert magicline hot node on undo/redo.
editor.on( 'loadSnapshot', function( event ) {
var elements = editor.document.find( 'p,br,div' ),
element;

for ( var i = elements.count(); i--; ) {
if ( ( element = elements.getItem( i ) ).data( 'cke-magicline-hot' ) ) {
// Restore hotNode
that.hotNode = element;
// Restore last access direction
that.lastCmdDirection = element.data( 'cke-magicline-dir' ) === 'true' ? true : false;
break;
var elements, element, i;

for ( var t in { p:1,br:1,div:1 } ) {
// document.find is not available in QM (#11149).
elements = doc.getElementsByTag( t );

for ( i = elements.count(); i--; ) {
if ( ( element = elements.getItem( i ) ).data( 'cke-magicline-hot' ) ) {
// Restore hotNode
that.hotNode = element;
// Restore last access direction
that.lastCmdDirection = element.data( 'cke-magicline-dir' ) === 'true' ? true : false;

return;
}
}
}
} );

0 comments on commit a686269

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.