From 9a5baafde7ac03ecff7230ec6904a489e599bdfb Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Tue, 17 Jul 2012 16:34:01 +1000 Subject: [PATCH] Don't capture form submits to new windows. --- admin/javascript/LeftAndMain.EditForm.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/javascript/LeftAndMain.EditForm.js b/admin/javascript/LeftAndMain.EditForm.js index 77cb0708a..94dc89146 100644 --- a/admin/javascript/LeftAndMain.EditForm.js +++ b/admin/javascript/LeftAndMain.EditForm.js @@ -163,9 +163,10 @@ // which means the browser auto-selects the first available form button. // This might be an unrelated button of the form field, // or a destructive action (if "save" is not available, or not on first position). - if(button) this.closest('.cms-container').submitForm(this, button); - - return false; + if(this.prop("target") != "_blank") { + if(button) this.closest('.cms-container').submitForm(this, button); + return false; + } }, /**