From drupal core ajax.js:

<?php
Drupal
.ajax.prototype.keypressResponse = function (element, event) {
 
// Create a synonym for this to reduce code confusion.
 
var ajax = this;
 
// Detect enter key and space bar and allow the standard response for them,
  // except for form elements of type 'text' and 'textarea', where the
  // spacebar activation causes inappropriate activation if #ajax['keypress'] is
  // TRUE. On a text-type widget a space should always be a space.
 
if (event.which == 13 || (event.which == 32 && element.type != 'text' && element.type != 'textarea')) {
    $(
ajax.element_settings.element).trigger(ajax.element_settings.event);
    return
false;
  }
};
?>

I propose changing line 98 of horizontal-tabs/horizontal-tabs.js to:

<?php
if (event.keyCode == 13 && event.target.type != "textarea" && event.target.type != "text") {
?>

Comments

Issue summary:View changes

Updated issue summary.

Issue summary:View changes
Status:Active» Closed (works as designed)

This works the same like drupal core js. See line 87 of misc/vertical-tabs.js