JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / elementspath / plugin.js
index 6dd23c8..47e7c47 100644 (file)
@@ -133,7 +133,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        editor.on( 'contentDomUnload', function()\r
                                {\r
-                                       getSpaceElement().setHtml( emptyHtml );\r
+                                       // If the spaceElement hasn't been initialized, don't try to do it at this time\r
+                                       // Only reuse existing reference.\r
+                                       spaceElement && spaceElement.setHtml( emptyHtml );\r
                                });\r
 \r
                        editor.addCommand( 'elementsPathFocus', commands.toolbarFocus );\r
@@ -168,9 +170,10 @@ CKEDITOR._.elementsPath =
 \r
                ev = new CKEDITOR.dom.event( ev );\r
 \r
+               var rtl = editor.lang.dir == 'rtl';\r
                switch ( ev.getKeystroke() )\r
                {\r
-                       case 37 :                                       // LEFT-ARROW\r
+                       case rtl ? 39 : 37 :                                    // LEFT-ARROW\r
                        case 9 :                                        // TAB\r
                                element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) );\r
                                if ( !element )\r
@@ -178,7 +181,7 @@ CKEDITOR._.elementsPath =
                                element.focus();\r
                                return false;\r
 \r
-                       case 39 :                                       // RIGHT-ARROW\r
+                       case rtl ? 37 : 39 :                                    // RIGHT-ARROW\r
                        case CKEDITOR.SHIFT + 9 :       // SHIFT + TAB\r
                                element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) );\r
                                if ( !element )\r