<commit_before>/**
 * @requires javelin-behavior javelin-stratcom javelin-dom
 * @provides javelin-behavior-aphront-form-disable-on-submit
 */

JX.behavior('aphront-form-disable-on-submit', function(config) {

  var restore = [];
  var root = null;
  var new_tab = false;

  JX.Stratcom.listen('click', 'tag:button', function(e) {
    var raw = e.getRawEvent();
    new_tab = (raw.altKey || raw.ctrlKey || raw.metaKey || raw.shiftKey);
  });


  JX.Stratcom.listen('keypress', ['tag:form', 'tag:textarea'], function(e) {
    var raw = e.getRawEvent();
    if (e.getSpecialKey() != 'return' || !raw.ctrlKey) {
      return;
    }

    e.kill();
<commit_msg>Make Cmd+Enter work to submit a form<commit_after>/**
 * @requires javelin-behavior javelin-stratcom javelin-dom
 * @provides javelin-behavior-aphront-form-disable-on-submit
 */

JX.behavior('aphront-form-disable-on-submit', function(config) {

  var restore = [];
  var root = null;
  var new_tab = false;

  JX.Stratcom.listen('click', 'tag:button', function(e) {
    var raw = e.getRawEvent();
    new_tab = (raw.altKey || raw.ctrlKey || raw.metaKey || raw.shiftKey);
  });


  JX.Stratcom.listen('keydown', ['tag:form', 'tag:textarea'], function(e) {
    var raw = e.getRawEvent();
    if (!(e.getSpecialKey() === 'return' && (raw.ctrlKey || raw.metaKey))) {
      return;
    }

    e.kill();

{'fraction_non_alphanumeric': 0.18389955686853768, 'fraction_numerical': 0.0, 'mean_word_length': 3.608843537414966, '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': '2349834', 'n_tokens_mistral': 515, 'n_tokens_neox': 490, 'n_words': 89}