-
1. Re: Strange behaviour of rich:fileupload with maxFilesQuantity="1" in Internet Explorer
michpetrov May 11, 2015 5:44 AM (in response to barbaraboie)There seems to be a bug in IE 11, we've already had this reported (RF-13723) but I couldn't find any solution, for some reason the browser simply stops firing click events.
-
2. Re: Strange behaviour of rich:fileupload with maxFilesQuantity="1" in Internet Explorer
barbaraboie May 11, 2015 9:14 AM (in response to michpetrov)Hello Michal, thanks for your answer.
I discovered that the uploadButton does work in IE if I put the opacity of the addButton to zero. You can still add documents if you click on the space where the addButton was, but you don't see the button anymore (that solution was good enough for us).
in my template.xhtml:
<h:outputScript target="head" library="javascript" name="test_richfaces.js" />
In test_richfaces.js:
jQuery.extend(RichFaces.ui.FileUpload.prototype, {
__updateButtons : function() {
if (!this.loadableItem && this.list.children(".rf-fu-itm").size()) {
if (this.items.length) {
this.uploadButton.css("display", "inline-block");
this.addButton.css("opacity", "0");
} else {
this.uploadButton.hide();
this.addButton.css("display", "inline-block");
}
} else {
this.uploadButton.hide();
this.addButton.css("display", "inline-block");
}
}
});