<commit_before>const descriptionFormIsOpen = new ReactiveVar(false);

BlazeComponent.extendComponent({
  onDestroyed() {
    descriptionFormIsOpen.set(false);
    $('.note-popover').hide();
  },

  descriptionFormIsOpen() {
    return descriptionFormIsOpen.get();
  },

  getInput() {
    return this.$('.js-new-description-input');
  },

  events() {
    return [
      {
        'submit .js-card-description'(event) {
          event.preventDefault();
          const description = this.currentComponent().getValue();
          this.data().setDescription(description);
        },
        // Pressing Ctrl+Enter should submit the form
        // was keydown
        // extraevent for saving input. buffer of keydown vs buffer time
        'keyup form textarea'(evt) {
          if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) {
            const submitButton = this.find('button[type=submit]');
            if (submitButton) {
              submitButton.click();
            }
          }
        },
      },
    ];
  },
}).register('descriptionForm');<commit_msg>revert tiny change on input event keydown <-> keyup<commit_after>const descriptionFormIsOpen = new ReactiveVar(false);

BlazeComponent.extendComponent({
  onDestroyed() {
    descriptionFormIsOpen.set(false);
    $('.note-popover').hide();
  },

  descriptionFormIsOpen() {
    return descriptionFormIsOpen.get();
  },

  getInput() {
    return this.$('.js-new-description-input');
  },

  events() {
    return [
      {
        'submit .js-card-description'(event) {
          event.preventDefault();
          const description = this.currentComponent().getValue();
          this.data().setDescription(description);
        },
        // Pressing Ctrl+Enter should submit the form
        'keydown form textarea'(evt) {
          if (evt.keyCode === 13 && (evt.metaKey || evt.ctrlKey)) {
            const submitButton = this.find('button[type=submit]');
            if (submitButton) {
              submitButton.click();
            }
          }
        },
      },
    ];
  },
}).register('descriptionForm');
{'fraction_non_alphanumeric': 0.1444976076555024, 'fraction_numerical': 0.0019138755980861245, 'mean_word_length': 2.3137876386687797, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2754614', 'n_tokens_mistral': 583, 'n_tokens_neox': 582, 'n_words': 106}