-
Notifications
You must be signed in to change notification settings - Fork 495
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
Fileinput does not work with refile gem #359
Comments
From a quick look at the code, it stops because later on it fires a I can see how third party plugins may not work if they're listen to this event at the document level for actual file inputs. For you, the only thing I can come up with is a workaround which is to remove the |
Yeah, for now I'm just running my own version with |
Noted, have to think about it... |
I have the same issue. Thanks for your suggestions. To keep original code unchanged I have overrided the original method like that: $(function() {
// Override jasny Fileinput.prototype.change method
function change(e) {
// copy/paste original function and comment out e.stopPropagation()
}
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var self = $(this),
input = self.find(':file'),
plugin = self.data('bs.fileinput');
input.off('change.bs.fileinput').on('change.bs.fileinput', $.proxy(change, plugin))
})
}); |
It appears that the call to
e.stopPropagation()
breaks the "direct" upload functionality of Refile. Refile is listening to the change event on document, and this call prevents it from bubbling.Is there a reason why the change event should not bubble?
The text was updated successfully, but these errors were encountered: