firefox fix for image insert
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 12 Feb 2010 20:30:11 +0000 (20:30 +0000)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 12 Feb 2010 20:30:11 +0000 (20:30 +0000)
Toolkit/CKImages/libjs/image_selector.js

index c6becfb..fd445c1 100644 (file)
@@ -30,7 +30,12 @@ var IMAGE_SELECTOR =
 
         $('div.thumb a.CKImageUse').click(function() {
             var img = $(this).siblings('img');
-            window.opener.CKEDITOR.tools.callFunction(1, img.attr('title'));
+            if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
+                var uf = 2;
+            }else{
+                var uf = 1;
+            }
+            window.opener.CKEDITOR.tools.callFunction(uf, img.attr('title'));
             window.close();
         });