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:
parent
122d1142b9
commit
06d80d0e57
1 changed files with 6 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue