Index: js/modal_forms.js
===================================================================
RCS file: /var/lib/cvs/drupal-common/modules/contrib/panels/js/modal_forms.js,v
retrieving revision 1.1.6.1
diff -u -8 -p -u -p -r1.1.6.1 modal_forms.js
--- js/modal_forms.js	29 Oct 2008 09:24:46 -0000	1.1.6.1
+++ js/modal_forms.js	30 Oct 2008 12:18:47 -0000
@@ -20,16 +20,19 @@ Drupal.Panels.Subform.bindAjaxResponse =
     $('#modalContent span.modal-title').html(data.title);
     $('#modalContent div.modal-content').html(data.output);
 
     Drupal.attachBehaviors('#modalContent');  
 
     // Bind forms to ajax submit.
     $('div.panels-modal-content form').unbind('submit'); // be safe here.
     $('div.panels-modal-content form').submit(function() {
+      if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
+        return false;
+      }
       $(this).ajaxSubmit({
         url: data.url,
         data: '',
         method: 'post',
         success: Drupal.Panels.Subform.bindAjaxResponse,
         error: function() { 
           alert(Drupal.t('There was an error submitting the form to ' + data.url)); $('#panels-modal').unmodalContent(); 
         },
