| Project: | Image Browser |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Just checked out the current 2.x dev version and clicking the fckeditor plugin button does absolutely nothing in IE7. No error message, no popup (i have no popup blockers installed).
I poked around the plugin code (plugins/imagebrowser/fckplugin.js) and it turns out IE7 barfs on "Image Browser" in the window.open call (line 16). I have no clue why and I don't know who's fault it is (drupal, ie, javascript, fckeditor, etc.) but the fix is simply removing the space (ie "ImageBrowser"). No "-" or "_" either-- they both cause the same problem as the space-- and it doesn't seem to matter as it appears as if the window title is coming from some place else (cause the space still appears to be there even after removing it from the function).
After 2 hours of debugging this (because, like an idiot, I thought that space couldn't possibly be the problem so I messed around with everything else in that function call) I could scream!
Hopefully this helps someone else avoiding the time sink I just had.
Comments
#1
Hi,
are you sure you are talking about IB 2.x?
there is no such path you wrote.
for the plugins there is only imagebrowser/plugins/ib_fckeditor directory, with file ib_fckeditor.js
in this file is only this function
function ib_process_insert(data) {
var FCK = top.window.opener.FCK;
var oImage = FCK.Selection.GetSelectedElement() ;
if ( oImage && oImage.tagName.toLowerCase() != 'img' )
oImage = null ;
var bHasImage = ( oImage != null ) ;
if ( !bHasImage )
{
oImage = FCK.InsertElement( 'img' ) ;
}
$(oImage).attr("src", data.image_url);
$(oImage).attr("alt", 'IB Image');
$(oImage).attr("class", data.styles);
$(oImage).attr("_fck_ib", data.fid + '==' + data.preset + '==' + data.link_preset + '==' + data.link_target + '==' + data.styles);
window.close();
}
with no words like 'image browser'
So I am relly curious what you are talking about, because I have problem with IE in imagebrowser 2.x (IE8 - no popup) and I have no solution yet how to fix it.
Thanks
#2
The full path to the file is sites/all/modules/fckeditor/plugins/imagebrowser/fckplugin.js.
#3
Works a charm, Thanks.
#4
Same here, the solution works, simply remove the space!
#5
For those who like patches I've attached 2.
fckplugin.patch:
Fixes this problem, adds resizable and removed the top/left thing which made the window open on the first screen if you have two connected (annoying) and also has the fix for not showing the button at all.
fckplugin_2.patch:
Same as above but without the "for for not show the button at all" included if you decided to take another approach on that issue.
#6
I'm facing the same problem in IE6, applied both the patches but didn't worked. Any solution?
#7
Works great for fixing this issue in both IE7 and IE8
#8
Ok i've moved this plugin into the IB module so you don't have to download it from an external site anymore. Means I can apply updates to it more easily. Also means however you will have overwrite the pervious fckeditor plugin.
New dev release of v2 should be out in the next 24hrs. Please test and let me know if you run into any more issues with IE.
Thanks for the patches.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.