Question

I am having trouble with hiding an element that is used as file select for PLupload.

The following code works in Chrome, Firefox, IE10,... Click "clickme", then clicking "Me no work in IE" will open a CommonDialogBox to select files, and "Hello!" will appear.

http://fiddle.jshell.net/hZY67/13
For IE8:
http://fiddle.jshell.net/hZY67/13/show

Observation: In IE8 the CommonDialogBox doesn't pop up, but "Hello!" appears

Now remove display:none from the css.=> problem solved

Conclusion: When an element is attached to PLupload as fileselect, and a parent element's display is toggled, the connection between the fileselect and PLupload breaks.

Any light on this situation and possible workaround appreciated :)

Était-ce utile?

La solution

http://www.plupload.com/punbb/viewtopic.php?pid=2381#p2381

@E-SPAR, Plupload needs to measure elements to generate file dialog trigger and position it properly, which obviously is not possible on elements having: display:none;. You might want to call refresh, after you show up your dialog.

In case of Plupload UI widget:

$('#uploader').plupload('getUploader').refresh();

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top