JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4b
[ckeditor.git] / _source / plugins / scayt / plugin.js
index 671815b..8486ad9 100644 (file)
@@ -624,9 +624,10 @@ CKEDITOR.plugins.scayt =
                        // If the "contextmenu" plugin is loaded, register the listeners.\r
                        if ( editor.contextMenu && editor.addMenuItems )\r
                        {\r
-                               editor.contextMenu.addListener( function(  )\r
+                               editor.contextMenu.addListener( function( element, selection )\r
                                        {\r
-                                               if ( !plugin.isScaytEnabled( editor ) )\r
+                                               if ( !plugin.isScaytEnabled( editor )\r
+                                                               || selection.getCommonAncestor().isReadOnly() )\r
                                                        return null;\r
 \r
                                                var scayt_control = plugin.getScayt( editor ),\r