Issue #729: Failed posts and comments don't retain text

The forms were cleared on a submit event instead of a ajax:success
This commit is contained in:
Thomas R. Koll 2010-12-28 23:46:34 +01:00
parent 122d1142b9
commit 06d80d0e57

View file

@ -97,10 +97,14 @@ jQuery(function ($) {
$('form[data-remote]').live('submit', function (e) {
$(this).callRemote();
e.preventDefault();
$(this).clearForm();
$(this).focusout();
});
$('form[data-remote]').live('ajax:success', function (e) {
$(this).clearForm();
$(this).focusout();
});
$('a[data-remote],input[data-remote]').live('click', function (e) {
$(this).callRemote();
e.preventDefault();