Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse button is not clickable #135

Open
epyx25 opened this issue May 27, 2019 · 3 comments
Open

Browse button is not clickable #135

epyx25 opened this issue May 27, 2019 · 3 comments

Comments

@epyx25
Copy link

epyx25 commented May 27, 2019

I try to use the latest version (1.13.21) in my project, but I can not browse files. If I click on the div nothing happens. (Dropzone works fine).
I wrapped ember-plupload in to a component

uploader-button.hbs

{{#pl-uploader class="top20" multiple=true name="pu" for="file-attachement" onfileadd="uploadLocalAttachments" as |queue dropzone|}}
    <div id="file-attachement">
        <div id='{{dropzone.id}}' class="dropzone dz-clickable">
            <div class="dz-default dz-message text-center">
                <div class="dz-icon icon-wrap icon-circle icon-wrap-md">
                    <i class="fa fa-cloud-upload fa-3x"></i>
                </div>
                <div>Upload</div>
            </div>
        </div>
    </div>
{{/pl-uploader}}

The generated HTML:

image

Console:

image

EDIT

uploader-button

  click() {
    console.log('element clicked')
    this.$('div.moxie-shim input[type=file]').trigger('click');
  },

Triggering the browse button through the wrapper component opens the file browsing window, but there are some weird errors in the console.
image

@knownasilya
Copy link
Owner

I think the id needs to be on the div.

@epyx25
Copy link
Author

epyx25 commented Jun 5, 2019

@knownasilya thanks for answering! sorry, I do not really get it. Which id should be on which div? In uploader-button.hbs I have an id on a div (file-attachement), the same value which the puploader component's for attribute has.

@knownasilya
Copy link
Owner

knownasilya commented Jun 5, 2019

Something like this <div id="file-attachement">Upload</div>. This uses the id from the for argument above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants