Giter Site home page Giter Site logo

Comments (13)

danko-master avatar danko-master commented on June 2, 2024

I agree with you, too, doing a project under IE - does not work. Author, please update gem.

from jquery-fileupload-rails.

danko-master avatar danko-master commented on June 2, 2024

Solved the problem by redefining click for IE

if (navigator.userAgent.indexOf("MSIE") > 0)
$("#upload_photo").mousedown ->
$(this).trigger('click')

from jquery-fileupload-rails.

lypanov avatar lypanov commented on June 2, 2024

@danko-master Thank you!!! Your tip saved me a ton of time.

from jquery-fileupload-rails.

danko-master avatar danko-master commented on June 2, 2024

You are welcome!)

from jquery-fileupload-rails.

nagyt234 avatar nagyt234 commented on June 2, 2024

Thx for this patch. Only a small modification, because this patch causes troubles in IE8 and IE9: auto upload does not start.
The following code works on IE8 9 and 10 also (limited to run in IE10):

      if (navigator.userAgent.indexOf("MSIE 10") > 0) {
       $("#upload_upload").bind('mousedown',function(event) {
         $(this).trigger('click')
       });

from jquery-fileupload-rails.

slopezm avatar slopezm commented on June 2, 2024

Thank you @danko-master and @nagyt234! For anyone having problems, just remember that you need to add the patch after you initialize the fileupload plugin.

from jquery-fileupload-rails.

thimstr avatar thimstr commented on June 2, 2024

I don't understand where i have to put this patch.

from jquery-fileupload-rails.

nagyt234 avatar nagyt234 commented on June 2, 2024

Dear @thimstr, you are initializing somewhere the fileupload plugin in javascript in a "document ready" block, and you should use the patch after it, e.g. in jQuery environment:

<script type="text/javascript" charset="utf-8">
  $(function () {
      // Initialize the jQuery File Upload widget:
      $('#fileupload').fileupload(
        ...
      );

      ...

      if (navigator.userAgent.indexOf("MSIE 10") > 0) {
       $("#upload_upload").bind('mousedown',function(event) {
         $(this).trigger('click')
       });
      }
  });
</script>

Note that $("#upload_upload") refers to the upload button, where the 'mousedown' event is to be converted to 'click' event in the case of MSIE10. I.e. 'upload_upload' is the HTML id of the button. @danko-master provided the similar example bit written in coffee-script.

from jquery-fileupload-rails.

thimstr avatar thimstr commented on June 2, 2024

it worked, thanks!

from jquery-fileupload-rails.

elisadistefano avatar elisadistefano commented on June 2, 2024

Hi @nagyt234,

the patch to fix double click problem on IE10 causes the error "Script5: Access denied", that is thrown when calling data.submit(), in order to get the XHR object. Then, the upload request never starts.
If you bind the mousedown event on input button, you will always get the error above on IE10.

So, what i'm doing wrong? Can you help me, please?
Thanks in advance.

from jquery-fileupload-rails.

LuisAndres avatar LuisAndres commented on June 2, 2024

I have the same error "Script5: Access denied", can help me?

from jquery-fileupload-rails.

ahmadhussain avatar ahmadhussain commented on June 2, 2024

This would be helpful for IE

$(function(){
if (navigator.userAgent.indexOf("MSIE") > 0) {
$("input[type=file]").live('mousedown',function(event) {$(this).trigger('click');});
}
});

from jquery-fileupload-rails.

felixbuenemann avatar felixbuenemann commented on June 2, 2024

Please open a new issue if this still happens with 0.4.2.

from jquery-fileupload-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.