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

download button doesn't work in Mozilla #1149

Closed
8 of 18 tasks
ivomasterche opened this issue Jan 4, 2018 · 1 comment
Closed
8 of 18 tasks

download button doesn't work in Mozilla #1149

ivomasterche opened this issue Jan 4, 2018 · 1 comment

Comments

@ivomasterche
Copy link

ivomasterche commented Jan 4, 2018

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of bootstrap-fileinput.
  • This is not an usage question. I confirm having read the plugin documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. add downloadUrl
  2. use Mozilla Firefox

Expected behavior and actual behavior

When I follow those steps, I see...
The button doesn't do anything

I was expecting...
To see the download dialogue

Environment

Browsers

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • Mac OS X
  • Linux
  • Mobile

Isolating the problem

  • This bug happens on the plugin demos page
  • The bug happens consistently across all tested browsers
  • This bug happens when using bootstrap-fileinput without other plugins
  • I can reproduce this bug in a jsbin

I had to add document.body.appendChild(a); in the fileinput.js .kv-file-download click action

@thibaultsmnt
Copy link

Hi,
I had the same problem and I found a temporary solution:
Add this to your file input config:

layoutTemplates:{ actionDownload: '<button type="button" class="{downloadClass}" title="{downloadTitle}" data-caption="{caption}" onclick="window.location.href=\'{downloadUrl}\'">{downloadIcon}</button>\n', }

It will replace the default download button by the one specified (http://plugins.krajee.com/file-input/plugin-options#layoutTemplates).
It's no good looking solution, but it seems to work for Safari, Firefox and Chrome.

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

No branches or pull requests

3 participants