When I try to upload more than 25 files in the dialog box, the length of the box increases and there is no scrollbar to view all the files.
Check out the screenshot:
https://i.sstatic.net/vBcsh.png
I added 36 files but couldn't see them all at once. The scrollbar doesn't appear either.
Here is the HTML code for the dialog box:
<div class="upload-files-dialog" tabindex="0" role="dialog" style="position: absolute; height: auto; top: 0px; left: 277px; display: block; width: 270px; right: auto; bottom: auto;" aria-describedby="ui-id-3" aria-labelledby="ui-id-4">
The corresponding CSS style I tried is:
div.upload-files-dialog {
position: absolute;
height: auto;
top: 0px;
left: 226px;
display: block;
width: 270px;
right: auto;
bottom: auto;
}
Even after setting the height as auto, it still doesn't adjust properly.
Below is the handlebars file for the dialog:
{{#if view.showFileList}}
{{file-list view.fileList}}
{{/if}}
The fileList in the Ember code is as follows:
menuContext: null,
formData: function () {
if (!this.get('menuContext.formData')) {
this.set('menuContext.formData', Ember.Object.create({ data: Ember.Object.create({ }), files: [] }));
}
return this.get('menuContext.formData.data');
}.property('menuContext'),
uploadHandle: null,
showFileList: function () {
return (this.get('uploadHandle.files.length') || this.get('menuContext.formData.data.file.length')) > 1;
}.property('uploadHandle.files.length', 'menuContext.formData.data.file'),
fileList: function () {
return this.get('uploadHandle.files') || [].slice.call(this.get('menuContext.formData.data.file'));
}.property('uploadHandle.files', 'menuContext.formData.data.file')
Pressing F12 brings up the scrollbar and adjusts the dialog. However, I want this to happen automatically when uploading files without needing to press F12. Unsure whether the issue lies in the CSS, Ember, or jQuery. Any suggestions?