Index: misc/ahah.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/Attic/ahah.js,v
retrieving revision 1.7.2.1
diff -u -p -r1.7.2.1 ahah.js
--- misc/ahah.js	11 Feb 2008 14:46:27 -0000	1.7.2.1
+++ misc/ahah.js	1 Dec 2009 22:45:54 -0000
@@ -17,12 +17,12 @@
  */
 Drupal.behaviors.ahah = function(context) {
   for (var base in Drupal.settings.ahah) {
-    if (!$('#'+ base + '.ahah-processed').size()) {
+    if (!$('#'+ base + '.ahah-processed', context).size()) {
       var element_settings = Drupal.settings.ahah[base];
 
-      $(element_settings.selector).each(function() {
+      $(element_settings.selector, context).each(function() {
         element_settings.element = this;
-        var ahah = new Drupal.ahah(base, element_settings);
+        var ahah = new Drupal.ahah(base, element_settings, context);
       });
 
       $('#'+ base).addClass('ahah-processed');
@@ -33,7 +33,7 @@ Drupal.behaviors.ahah = function(context
 /**
  * AHAH object.
  */
-Drupal.ahah = function(base, element_settings) {
+Drupal.ahah = function(base, element_settings, context) {
   // Set the properties for this object.
   this.element = element_settings.element;
   this.selector = element_settings.selector;
@@ -77,13 +77,13 @@ Drupal.ahah = function(base, element_set
     beforeSubmit: function(form_values, element_settings, options) {
       return ahah.beforeSubmit(form_values, element_settings, options);
     },
-    success: function(response, status) {
+    success: function(response, status, context) {
       // Sanity check for browser support (object expected).
       // When using iFrame uploads, responses must be returned as a string.
       if (typeof(response) == 'string') {
         response = Drupal.parseJson(response);
       }
-      return ahah.success(response, status);
+      return ahah.success(response, status, context);
     },
     complete: function(response, status) {
       if (status == 'error' || status == 'parsererror') {
@@ -145,8 +145,8 @@ Drupal.ahah.prototype.beforeSubmit = fun
 /**
  * Handler for the form redirection completion.
  */
-Drupal.ahah.prototype.success = function (response, status) {
-  var wrapper = $(this.wrapper);
+Drupal.ahah.prototype.success = function (response, status, context) {
+  var wrapper = $(this.wrapper, context);
   var form = $(this.element).parents('form');
   // Manually insert HTML into the jQuery object, using $() directly crashes
   // Safari with long string lengths. http://dev.jquery.com/ticket/1152
Index: misc/autocomplete.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v
retrieving revision 1.23
diff -u -p -r1.23 autocomplete.js
--- misc/autocomplete.js	4 Jan 2008 11:53:21 -0000	1.23
+++ misc/autocomplete.js	1 Dec 2009 22:45:54 -0000
@@ -10,7 +10,7 @@ Drupal.behaviors.autocomplete = function
     if (!acdb[uri]) {
       acdb[uri] = new Drupal.ACDB(uri);
     }
-    var input = $('#' + this.id.substr(0, this.id.length - 13))
+    var input = $('#' + this.id.substr(0, this.id.length - 13), context)
       .attr('autocomplete', 'OFF')[0];
     $(input.form).submit(Drupal.autocompleteSubmit);
     new Drupal.jsAC(input, acdb[uri]);
Index: misc/tabledrag.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tabledrag.js,v
retrieving revision 1.13.2.5
diff -u -p -r1.13.2.5 tabledrag.js
--- misc/tabledrag.js	18 Jun 2009 12:24:24 -0000	1.13.2.5
+++ misc/tabledrag.js	1 Dec 2009 22:45:54 -0000
@@ -16,7 +16,7 @@ Drupal.behaviors.tableDrag = function(co
     if (!$('#' + base + '.tabledrag-processed', context).size()) {
       var tableSettings = Drupal.settings.tableDrag[base];
 
-      $('#' + base).filter(':not(.tabledrag-processed)').each(function() {
+      $('#' + base, context).filter(':not(.tabledrag-processed)').each(function() {
         // Create the new tableDrag instance. Save in the Drupal variable
         // to allow other scripts access to the object.
         Drupal.tableDrag[base] = new Drupal.tableDrag(this, tableSettings);