Closed (won't fix)
Project:
FileField Sources
Version:
6.x-1.10
Component:
Source: IMCE
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2011 at 16:26 UTC
Updated:
7 Feb 2018 at 01:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ducktape commentedAfter some research, I found the source of the problem. IE doesn't support the "onchange" event.
Adding the same actions in an "onblur" event seems to fix this.
That requires a "visibile" form element though. Hidden fields and textfields with "display:none" or "visibility:hidden" didn't work either. I added a "position:absolute" to fix the layout.
A better solution is always appreciated.
Comment #2
tirdadc commentedI'm running into this very issue but specifically on IE8 only. I tried the patch and it results in a new error ("Object doesn't support this property or method") but if I ignore it, the filefield is filled out correctly. Still trying to resolve that for now.
Comment #3
tirdadc commentedAlright, this version uses try/catch to suppress the weird JS error and the field works fine in IE8.
Comment #4
quicksketchThanks @tirdadc and @ducktape for the patches! Seems that onchange really just isn't supported on hidden fields, so after changing the #type to a 'textfield', changing the event to onblur is unnecessary. I also encountered a problem with the hidden textfield that if you used the tab key to go through elements on the page, you would accidentally focus and then blur the textfield, causing it to attempt to attach nothing. No error would occur, but it would fire an AJAX event and reload the file element.
I made some minor changes that simplify the JS and appear to work in all browsers (Opera, Firefox, Chrome, IE7-9). I've committed this patch to both branches of the project in preparation for a new release shortly.
Comment #5
quicksketchCommitted and pushed.
Comment #6
amfranco commentedThanks! this patch works fine in IE8 but without the property '#disabled' => TRUE
Comment #7
quicksketchThat's odd, I tried it out in IE8 and it worked fine. Are you saying that the 1.5 release doesn't work in IE8? Which version of jQuery are you using on the site?
Comment #8
amfranco commentedI tried the release 1.6 and still not working with IE8, the action 'onblur' is also needed(check comments above), I am using JQuery 1.4.4.
This issue is for 'File browser' option using IMCE in an imagefield, the 'Upload' option works ok.
Comment #9
bmblack commentedI'm also using 1.6 with jquery 1.4.4 and the file browser is not working in IE8
Comment #10
bmblack commentedHopefully this additional info helps:
When i choose an image through the "File browser" option (in IE8), it appears as though nothing is happening. The file browser window just closes. If i save, the image I selected is not displayed.
I noticed if I select an image from the file browser, then inspect the page before saving, the hidden text field IS populated with the relative URL to the image I selected.
Comment #11
bmblack commentedComment #12
memoorthy commented+ Subscribing. I'm using IE8. After selecting the file in IMCE, insert does not do anything.
Comment #13
Anonymous (not verified) commentedI'm working with the latest version off IMCE and even after trying the different paches, nothing happens in IE8, IE9 works just fine.
But i'm working on a intranet.
Stuff like this should work on XP with IE8.
Comment #14
quicksketchOkay I found the reason why it was working for me was a jQuery version issue. If you install jQuery update and use jQuery 1.5.x or 1.7.x, then the problem does not occur. However, supporting the stock D7 version of jQuery is more important than dealing with an extra hidden field that gets focus accidentally at times, so I essentially undid my changes and used the suggested approach by @amfranco.
Comment #16
johnrosswvsu commentedHi,
The latest patch (which is already in the recent versions of the module) does not work in Mac OS browsers, as per supported by https://drupal.org/node/2004922.
Personally experienced similar issue also.
Thanks.
Comment #17
johnrosswvsu commentedComment #18
osopolarOne thing is, that file_path is still rendered as hidden instead of text-field as fixed #4, the other thing is, that on blur is not triggered always - it seems to depend on the jQuery version and the Browser. On Firefox the d7 version is working well with onblur but the d6 not. Using onchange seems to work well – tested on MacOS (Safari, Firefox and Chrome) and Windows (IE8 (WinXP) an IE11 and Firefox (Win7)), jQuery version 1.3.2.
Not sure but maybe this is somehow related to jQuery blure() – at least it could be an explanation why blure works on d7 (using jQuery 1.4.4) but not d6 (with jQuery 1.3.2):
Comment #20
quicksketchD6 is no longer supported, so closing this out.