Index: filefield.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/filefield/filefield.js,v
retrieving revision 1.15
diff -u -r1.15 filefield.js
--- filefield.js	2 Mar 2009 07:22:48 -0000	1.15
+++ filefield.js	3 Mar 2009 14:46:59 -0000
@@ -37,7 +37,8 @@
  * Prevent FileField uploads when using buttons not intended to upload.
  */
 Drupal.behaviors.filefieldButtons = function(context) {
-  $('input.form-submit.ahah-processed').bind('mousedown', Drupal.filefield.disableFields);
+  // Add mousedown handler to all submit buttons
+  $('input.form-submit').bind('mousedown', Drupal.filefield.disableFields);
 };
 
 /**
@@ -67,6 +68,11 @@
   disableFields: function(event){
     var clickedButton = this;
 
+    // Check that the clicked button is using ahah processing.
+    if ( !$(clickedButton).hasClass('ahah-processed') ) {
+      return;
+    }
+    
     // Using the grandparent, we ensure that we get up to at least the level
     // of the CCK multiple field wrapper.
     var $enabledFields = $(this).parent().parent().find('input.form-file');
@@ -81,6 +87,6 @@
     // has a 1 millisecond timeout.
     setTimeout(function(){
       $disabledFields.attr('disabled', '');
-    }, 1);
+    }, 1000);
   }
 };
