Index: misc/ajax.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ajax.js,v
retrieving revision 1.5
diff -u -r1.5 ajax.js
--- misc/ajax.js	4 Nov 2009 04:38:30 -0000	1.5
+++ misc/ajax.js	13 Nov 2009 02:36:01 -0000
@@ -166,13 +166,21 @@
     return false;
   });
 
+  // Track whether a textarea is the current focus.
+  Drupal.textareaInFocus = false;
+  $('textarea').focus( function(event) {
+    Drupal.textareaInFocus = true;
+  }).blur( function(event) {
+    Drupal.textareaInFocus = false;
+  });
+
   // If necessary, enable keyboard submission so that AJAX behaviors
   // can be triggered through keyboard input as well as e.g. a mousedown
   // action.
   if (element_settings.keypress) {
-    $(element_settings.element).keypress(function (event) {
-      // Detect enter key.
-      if (event.keyCode == 13) {
+    $(element_settings.element).keypress( function(event) {
+      // Detect enter key. Take no action if a textarea element is in focus.
+      if (event.keyCode == 13 && !Drupal.textareaInFocus) {
         $(element_settings.element).trigger(element_settings.event);
         return false;
       }
