Info:
OS: Vista
Browser: IE 8.0
Drupal: 6.16
Wysiwyg: 6.x-2.1
Ckeditor: 3.2.0.5205
IMCE Wysiwyg API bridge: 6.x-1.x-dev (2010-Mar-12)
IMCE: 6.x-2.0-beta1
Browsing in IMCE double clicking a file will open the file in a new browser window instead of passing the file url back to the WYSIWYG editor dialog.
So after two days of tracing through all of the modules both in php and in the javascript files I finally found the one element causing all of my woes.
I determined that in Internet Explorer the browser can't reference abstract functions by reference from a child window to a parent window. For some odd reason IE sees the anonymous function as an object.
All other browsers FireFox, Opera, Safari/Chrome see the function as a function and of course work as expected.
Current Code:
imce/js/imce_set_app.js
line 83
//checks if a string is a function name in the given scope. returns function reference. supports x.y.z notation.
var isFunc = function(str, scope) {
var obj = scope || appWindow;
var parts = str.split('.'), len = parts.length;
for (var i = 0; i < len && (obj = obj[parts[i]]); i++);
return i == len && $.isFunction(obj) ? obj : false;
}
Patched Code:
imce/js/imce_set_app.js
line 83:
//checks if a string is a function name in the given scope. returns function reference. supports x.y.z notation.
var isFunc = function(str, scope) {
var obj = scope || appWindow;
var parts = str.split('.'), len = parts.length;
for (var i = 0; i < len && (obj = obj[parts[i]]); i++);
return i == len && ($.isFunction(obj) || typeof(obj) == 'object') ? obj : false;
}
Now the double click, image click, and "insert file" button sends the image/file reference in IE just like all of the "good" browsers. :)
Comment | File | Size | Author |
---|---|---|---|
#11 | imce.isfunction.patch | 761 bytes | ufku |
Comments
Comment #1
emptyvoid CreditAttribution: emptyvoid commentedChanging status so maybe someone will take a look at this and give feedback and or integrate the small change to a release.
Comment #2
ufku CreditAttribution: ufku commentedI can't reproduce this bug and nobody has reviewed this patch.
Please make sure this issue is not specific to you.
Comment #3
ccoppen CreditAttribution: ccoppen commentedThis issue is not specific to him.
I have tested it in Firefox 3.6, Chrome 5, and IE8 (and compatibility mode).
The "Insert File" link disappears on IE. It's there on Chrome and Firefox.
Using IMCE 6.x-2.0-beta3
I can confirm that the patch works fine.
Comment #4
ufku CreditAttribution: ufku commentedCan you please find out what you have in common?
Modules, themes etc.
Comment #5
ccoppen CreditAttribution: ccoppen commentedCustom theme.
CKEditor 3.2.1
IMCE Wysiwyg API bridge 6.x-1.x-dev
Wysiwyg 6.x-2.1
IMCE 6.x-2.0-beta3
Drupal 6.17
This issue only happens on IE 8.
Other browsers seem fine.
Comment #6
nauthiz693 CreditAttribution: nauthiz693 commentedI have the same problem:
Custom theme for front end
Admin module with Rubik theme for backend
Wysiwyg 6.x-2.1
IMCE Wysiwyg API bridge 6.x-1.1
IMCE 6.x-2.0-beta3
CKEditor 3.2
Comment #7
nauthiz693 CreditAttribution: nauthiz693 commentedI can also confirm that the patch works for me. Thanks!
Comment #8
Ives CreditAttribution: Ives commentedSame issue, good fix.
Nice work!
Comment #9
leon85321 CreditAttribution: leon85321 commentedThx for this fix!!
Confirmed #0 patch works!
Comment #10
ufku CreditAttribution: ufku commentedDoes everybody here use jquery_update?
Comment #11
ufku CreditAttribution: ufku commentedI think this is about the $.isFunction changed in jquery 1.3. It is not accurate in IE.
Attached patch uses the code from jquery 1.2.6.
Comment #12
ufku CreditAttribution: ufku commentedCommitted to dev branch.
You can test it there.