Giter Club home page Giter Club logo

Comments (22)

inetufo avatar inetufo commented on August 20, 2024

Where is the author.Please have a look

from jquery-ujs.

modsognir avatar modsognir commented on August 20, 2024

I am having this issue too with IE8 and jquery 1.4.3. Button disables but doesn't submit.

from jquery-ujs.

inetufo avatar inetufo commented on August 20, 2024

Look at this issue http://github.com/rails/jquery-ujs/issues#issue/33
I've found a way to solve it without knowing the reason

from jquery-ujs.

modsognir avatar modsognir commented on August 20, 2024

.live seems to be an issue with IE8 in a few versions of jquery it seems. .bind is similar but I dont know what kind of effect it will have changing it, seemingly none from my testing.

from jquery-ujs.

inetufo avatar inetufo commented on August 20, 2024

jquery 1.4.3 is the same as jquery1.4.1

from jquery-ujs.

neerajsingh0101 avatar neerajsingh0101 commented on August 20, 2024

This is jQuery issue. Take a look at http://bugs.jquery.com/ticket/7061 .

from jquery-ujs.

jobstar-se avatar jobstar-se commented on August 20, 2024

it seems easy to provide a workaround while we are waiting for the jquery fix. just call disable_with_input_function and enable from within the callRemote function. i have already fixed this in my version. i can provide the patch if you like.

i think it is cleaner to have the enable code refactored into its own function anyway like disable_with_input_function.

my fix also solves the problem that if you have remote link_to elements in a form the buttons in the form are disabled but never enabled (tested on chrome and firefox).

from jquery-ujs.

neerajsingh0101 avatar neerajsingh0101 commented on August 20, 2024

Yes please do submit the patch. If possible add tests too. Thanks.

from jquery-ujs.

simmerz avatar simmerz commented on August 20, 2024

This isn't just an IE8 issue. Seems to be a problem in 1.4.4 Firefox too.

from jquery-ujs.

cracell avatar cracell commented on August 20, 2024

If IE8 and IE7 are supported it needs to be fixed or disable_with needs to be disabled until it can be fixed. Or listing it on the Readme as a known issue until it can be resolved.

I was able to get it working by replacing several of the lives with binds, which unfortunately loses the live functionality so it not a suitable patch. (I'm using jQuery 1.4.4)

from jquery-ujs.

inspire22 avatar inspire22 commented on August 20, 2024

Has this been fixed yet for IE?

from jquery-ujs.

zilkey avatar zilkey commented on August 20, 2024

I just downloaded jquery 5 and it's still a bug. However, it only seems to be a bug for synchronous form posts - it works perfectly well if you form is data-remote=true.

I decided that it was worth it for me to just turn off the disable behavior in IE for non-ajax forms, so I added this clause to disableFormElements as a temporary work-around:

if($.browser.msie && !form.is("[data-remote=true]")){
  return;
}

So the whole function is:

function disableFormElements(form) {
  if($.browser.msie && !form.is("[data-remote=true]")){
    return;
  }
  form.find('input[data-disable-with]').each(function() {
    var input = $(this);
    input.data('ujs:enable-with', input.val())
      .val(input.attr('data-disable-with'))
      .attr('disabled', 'disabled');
  });
}

So while it doesn't solve the problem, it limits it to synchronous IE posts, and all other browsers and IE ajax posts still get goodness.

from jquery-ujs.

mislav avatar mislav commented on August 20, 2024

I can't reproduce this. Can you guys check the latest rails.js against jQuery 1.4.3 or newer? If you get failing results, please submit more details.

from jquery-ujs.

inspire22 avatar inspire22 commented on August 20, 2024

as of 3 days ago it was broken for me with 1.4.3.

Add a non-remote form tag, 'data-disable-with'='please wait'. Try it in IE - it'll change the submit button to 'please wait' but won't submit the form.

from jquery-ujs.

zilkey avatar zilkey commented on August 20, 2024

Just tested against jquery 1.5 + IE8 and it worked like a charm! That timeout was clever.

from jquery-ujs.

mislav avatar mislav commented on August 20, 2024

Closing this issue since the timeout added in 900d714 should fix the problem.

from jquery-ujs.

tekin avatar tekin commented on August 20, 2024

It appears to still be broken with jquery 1.5 on IE7.

from jquery-ujs.

mislav avatar mislav commented on August 20, 2024

Can't reproduce this with any version of jQuery (1.4.4, 1.5, edge) and IE7 on WinXp. This is the code I'm using:

<form action="/echo" method="post">
  <p>
    <input type="text" name="name" required>
    <input type="submit" name="submit" value="Send" data-disable-with="Sending…">
  </p>
</form>

Both "name" and "submit" get serialized, the submit button gets disabled, and the form is sent.

from jquery-ujs.

tekin avatar tekin commented on August 20, 2024

What about when you submit the form by hitting return?

from jquery-ujs.

mislav avatar mislav commented on August 20, 2024

Still works. There's no reason why it wouldn't; disabling of form buttons is now done asynchronously and can't interfere with submitting of form in any way.

from jquery-ujs.

tekin avatar tekin commented on August 20, 2024

My apologies, it is indeed working. I think I may have inadvertently tested against the deployed code, which had an older version of rails.js.

from jquery-ujs.

fro avatar fro commented on August 20, 2024

Same problem here. Thanks to zilkey for the workaround...

from jquery-ujs.

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.