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:
@@ -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, "开仓提交中…");
|
||||
|
||||
Reference in New Issue
Block a user