<commit_before>nforge.namespace('shortcut');

// ctrl + enter to submit a form
nforge.shortcut.submit = function () {
  var that;

  that = {
    init : function () {
      var eventHandler = function (event) {
        if (event.ctrlKey && event.which == 13) {
        $(event.target).parents('form').get(0).submit();
        }
      }

      $('textarea').keydown(eventHandler);
      $('input').keydown(eventHandler);
    }
  };

  return that;
};<commit_msg>shortcut: Fix that submit shortcut ignores event.<commit_after>nforge.namespace('shortcut');

// ctrl + enter to submit a form
nforge.shortcut.submit = function () {
  var that;

  that = {
    init : function () {
      var eventHandler = function (event) {
        if (event.ctrlKey && event.which == 13) {
          $($(event.target).parents('form').get(0)).submit();
        }
      }

      $('textarea').keydown(eventHandler);
      $('input').keydown(eventHandler);
    }
  };

  return that;
};
{'fraction_non_alphanumeric': 0.17133956386292834, 'fraction_numerical': 0.006230529595015576, 'mean_word_length': 2.6515151515151514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '510794', 'n_tokens_mistral': 313, 'n_tokens_neox': 294, 'n_words': 60}