X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Felementspath%2Fplugin.js;h=47e7c4785bec7b7ca25fb4939213ecb4d132c11a;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=6dd23c8a74c56d4bd3ceee184346feee80862b36;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git diff --git a/_source/plugins/elementspath/plugin.js b/_source/plugins/elementspath/plugin.js index 6dd23c8..47e7c47 100644 --- a/_source/plugins/elementspath/plugin.js +++ b/_source/plugins/elementspath/plugin.js @@ -133,7 +133,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editor.on( 'contentDomUnload', function() { - getSpaceElement().setHtml( emptyHtml ); + // If the spaceElement hasn't been initialized, don't try to do it at this time + // Only reuse existing reference. + spaceElement && spaceElement.setHtml( emptyHtml ); }); editor.addCommand( 'elementsPathFocus', commands.toolbarFocus ); @@ -168,9 +170,10 @@ CKEDITOR._.elementsPath = ev = new CKEDITOR.dom.event( ev ); + var rtl = editor.lang.dir == 'rtl'; switch ( ev.getKeystroke() ) { - case 37 : // LEFT-ARROW + case rtl ? 39 : 37 : // LEFT-ARROW case 9 : // TAB element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) ); if ( !element ) @@ -178,7 +181,7 @@ CKEDITOR._.elementsPath = element.focus(); return false; - case 39 : // RIGHT-ARROW + case rtl ? 37 : 39 : // RIGHT-ARROW case CKEDITOR.SHIFT + 9 : // SHIFT + TAB element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) ); if ( !element )