Fix double POST on open position in embed shell mode.

Embed capture-phase form handler and allowManualOrderSubmit both submitted /add_order; skip custom forms and use a single fetch reload path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 19:03:25 +08:00
parent 2dadd93d91
commit cfc703ae5b
4 changed files with 46 additions and 5 deletions
+4
View File
@@ -889,6 +889,10 @@ function cancelExchangeTpsl(orderId, role){
function allowManualOrderSubmit(form){
form.dataset.rrOk = "1";
if(document.body && document.body.getAttribute("data-embed-shell") === "1" && window.InstanceEmbed && window.InstanceEmbed.postFormAndReload){
window.InstanceEmbed.postFormAndReload(form, "开仓提交中…");
return;
}
if(window.FormSubmitGuard){
if(FormSubmitGuard.isLocked(form)){
FormSubmitGuard.setSubmitLabel(form, "开仓提交中…");