فهرست منبع

HUE-1047 [core] Invalid form submission blocks next submission

Changed the form submission code to listen to ajax loaded forms
Enrico Berti 12 سال پیش
والد
کامیت
3fa47e5
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      desktop/core/src/desktop/templates/common_footer.html

+ 3 - 2
desktop/core/src/desktop/templates/common_footer.html

@@ -46,7 +46,7 @@ limitations under the License.
             startPendingRequestsPolling();
             resetTimeout = window.setTimeout(function () {
               resetPrimaryButtonsStatus();
-            }, 100);
+            }, 200);
           }
         });
 
@@ -59,7 +59,8 @@ limitations under the License.
           window.clearTimeout(resetTimeout);
         });
 
-        $("form").submit(function () {
+        $(document).on("submit", "form", function () {
+          hasAjaxBeenSent = false;
           window.setInterval(function () {
             window.clearTimeout(resetTimeout);
           }, 10);