Browse Source

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

Changed the form submission code to listen to ajax loaded forms
Enrico Berti 12 năm trước cách đây
mục cha
commit
3fa47e5
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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);