JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.3
[ckeditor.git] / _source / plugins / bidi / plugin.js
index 761e16b..d3ef351 100644 (file)
@@ -48,7 +48,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        {\r
                var editor = evt.editor,\r
                        chromeRoot = editor.container.getChild( 1 ),\r
-                       directionNode = getElementForDirection( evt.data.path.lastElement );\r
+                       directionNode = evt.data.path.block || evt.data.path.blockLimit;\r
 \r
                if ( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) )\r
                        chromeRoot.addClass( 'cke_mixed_dir_content' );\r
@@ -123,7 +123,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                // the element and all its children, so it will get really reflected\r
                // like a mirror. (#5910)\r
                if ( dir != dirBefore )\r
-                       editor.fire( 'dirChanged', element );\r
+               {\r
+                       editor.fire( 'dirChanged',\r
+                               {\r
+                                       node : element,\r
+                                       dir : dir\r
+                               } );\r
+               }\r
 \r
                editor.forceNextSelectionCheck();\r
 \r