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

Not working on Firefox #104

Open
rpesciotta opened this issue Mar 31, 2016 · 8 comments
Open

Not working on Firefox #104

rpesciotta opened this issue Mar 31, 2016 · 8 comments

Comments

@rpesciotta
Copy link

Hi,

I got a form working perfectly, testing on Chrome.
But if I open the same page/form with Firefox, the "Choose file" button does not trigger any action, that is, I don't see the dialog for selecting a file.
I switched to firefox debugger, and I see when I click on the referred button, this piece of code is called in jQuery.js:

if ( !(eventHandle = elemData.handle) ) {
            eventHandle = elemData.handle = function( e ) {
                // Discard the second event of a jQuery.event.trigger() and
                // when an event is called after a page has unloaded
                return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
                    jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
                    undefined;
            };
            // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
            eventHandle.elem = elem;
        }

And apparently, it's always returning undefined in firefox.
Is this a known issue? Am I missing something?

@olumytee
Copy link

olumytee commented Apr 26, 2016

Hi @rpesciotta @yogiben Any fix for this yet ?

@derdaumen
Copy link

I experience the same problem. I'm new to all of this github packages pull jazz. How can I help to fix this?

@kolyasya
Copy link

Have the same problem, no click action for FF

@yAnn1ck-B
Copy link

same here, not working in ff and ie, only chrome

@brylie
Copy link

brylie commented May 26, 2016

Same here:

@brylie
Copy link

brylie commented Jun 2, 2016

As an aside, we migrated to a different file upload solution called Meteor FileCollection. FileCollection also uses GridFS, and the UI can be configured with drag-and-drop support.

@jonathascarrijo
Copy link

A year has passed, and still no fix. Is this package abandoned?

@mahfuzmohammad
Copy link

Hi everyone, recently I used this module and found the similar problem. After some research I think I know what is happening.

Why it's not working in firefox or IE?
If you check the source code, more specifically autoform-file.html file, there is a template called afFileSelectFileBtnTemplate. Here the input field is used inside a button. After some research, it seems like an input field inside a button is not allowed in HTML.

References:

My proposed solution
It seems like the template should be updated but I have done another way in my case. I added a listener that listened the click event for the button and fires another click event for the input field. The code is given below:

'click button.af-select-file.js-af-select-file': function(event, template) {
	$(event.target).find("input.js-file").click();
}

I wanted to give a fix to this problem and I would like to have suggestion from @yogiben

Thank you!

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

8 participants