From ef66e043156ba322fb690d9ebc2fca0900538abd Tue, 17 Apr 2012 18:32:17 -0500
From: Gitesh Koli <gitesh.koli@verizonwireless.com>
Date: Tue, 17 Apr 2012 18:31:50 -0500
Subject: [PATCH] Patch for http://drupal.org/node/1515734

diff --git a/misc/form.js b/misc/form.js
index 259b84e..f90caf3 100644
--- a/misc/form.js
+++ b/misc/form.js
@@ -45,15 +45,11 @@
   attach: function (context) {
     // These events are namespaced so that we can remove them later.
     var events = 'change.formUpdated click.formUpdated blur.formUpdated keyup.formUpdated';
-    $(context)
-      // Since context could be an input element itself, it's added back to
-      // the jQuery object and filtered again.
-      .find(':input').andSelf().filter(':input')
-      // To prevent duplicate events, the handlers are first removed and then
-      // (re-)added.
-      .unbind(events).bind(events, function () {
+    $(context).undelegate(':input', events);
+    $(context).delegate(':input', events, function () {
         $(this).trigger('formUpdated');
-      });
+      }
+    );
   }
 };
