Giter Site home page Giter Site logo

File input events about jquery-iframe-transport HOT 2 OPEN

cmlenz avatar cmlenz commented on June 13, 2024 1
File input events

from jquery-iframe-transport.

Comments (2)

matthewtuck avatar matthewtuck commented on June 13, 2024

I have had this issue trying to use this code too, it seems to be due to this code:

  // Move the file fields into the hidden form, but first remember their
  // original locations in the document by replacing them with disabled
  // clones. This should also avoid introducing unwanted changes to the
  // page layout during submission.
  markers = files.after(function(idx) {
    return $(this).clone().prop("disabled", true);
  }).next();
  files.appendTo(form);

As a result, your code is moved into IFRAME and won't run the second time.

The easiest solution for the author of this product would seem to be putting the clones in the IFRAME instead, or perhaps using something like clone(true) to also clone events.

The easiest workaround for the users of this product I found was to use live type events, i.e. the selector parameter of the 'on' function.

from jquery-iframe-transport.

chrishoage avatar chrishoage commented on June 13, 2024

This is actually due to the commit in this pull request: #24 (comment)

I have asked the author to revert the commit.

The issue is that he is not putting back the original file inputs after replacing them with markers.

If you look at the code for the linked pull request you can see the offending code.

from jquery-iframe-transport.

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.