Comments (22)
Where is the author.Please have a look
from jquery-ujs.
I am having this issue too with IE8 and jquery 1.4.3. Button disables but doesn't submit.
from jquery-ujs.
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.
.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.
jquery 1.4.3 is the same as jquery1.4.1
from jquery-ujs.
This is jQuery issue. Take a look at http://bugs.jquery.com/ticket/7061 .
from jquery-ujs.
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.
Yes please do submit the patch. If possible add tests too. Thanks.
from jquery-ujs.
This isn't just an IE8 issue. Seems to be a problem in 1.4.4 Firefox too.
from jquery-ujs.
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.
Has this been fixed yet for IE?
from jquery-ujs.
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.
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.
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.
Just tested against jquery 1.5 + IE8 and it worked like a charm! That timeout was clever.
from jquery-ujs.
Closing this issue since the timeout added in 900d714 should fix the problem.
from jquery-ujs.
It appears to still be broken with jquery 1.5 on IE7.
from jquery-ujs.
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.
What about when you submit the form by hitting return?
from jquery-ujs.
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.
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.
Same problem here. Thanks to zilkey for the workaround...
from jquery-ujs.
Related Issues (20)
- TypeError: Handler is undefined HOT 1
- Using jquery_ujs in a non-Rails application HOT 1
- Rails `remote: true` not making AJAX request HOT 1
- Incorrect //= require in application.js HOT 1
- Disable remote select when waiting for the response from the server
- link with data-remote=true fails inside disabled fieldset HOT 1
- Form rendered by js.erb does not submit by ajax HOT 1
- Modified data-params attribute doesn't get submitted HOT 3
- Why does my form always get submitted with Content-Type:application/x-www-form-urlencoded; HOT 4
- does rails enforce data-method "GET" be uppercase? HOT 1
- not works as expected with rails-5.2 HOT 1
- npm support HOT 2
- button_to my_routed_path(a: "ok", b: "or", c: "not?"), remote: true does NOT call JS rendering HOT 1
- event.preventDefault does not prevent default action
- $.rails undefined with jquery 3.4.0 HOT 10
- Future of this gem HOT 1
- XSS in some browsers
- File form redirection
- What do you mean that they are being included? It is fine if they are included in `Gem.loaded_specs`, the real issue is if they are being _required_.
- Ajax responses not working on js.erb requests in Rails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-ujs.