Aleksander Machniak
2014-10-30 a075df6f086656f9a01f0023111be6eb83c9d0db
program/js/app.js
@@ -3319,7 +3319,7 @@
    if (!this.gui_objects.messageform)
      return false;
    var i, input_from = $("[name='_from']"),
    var i, pos, input_from = $("[name='_from']"),
      input_to = $("[name='_to']"),
      input_subject = $("input[name='_subject']"),
      input_message = $("[name='_message']").get(0),
@@ -3353,11 +3353,18 @@
    }
    if (!html_mode) {
      this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length);
      pos = this.env.top_posting ? 0 : input_message.value.length;
      this.set_caret_pos(input_message, pos);
      // add signature according to selected identity
      // if we have HTML editor, signature is added in callback
      if (input_from.prop('type') == 'select-one') {
        this.change_identity(input_from[0]);
      }
      // scroll to the bottom of the textarea (#1490114)
      if (pos) {
        $(input_message).scrollTop(input_message.scrollHeight);
      }
    }
@@ -3652,7 +3659,7 @@
  this.save_response = function()
  {
    // show dialog to enter a name and to modify the text to be saved
    var buttons = {}, text = this.editor.get_content(true, true),
    var buttons = {}, text = this.editor.get_content({selection: true, format: 'text', nosig: true}),
      html = '<form class="propform">' +
      '<div class="prop block"><label>' + this.get_label('responsename') + '</label>' +
      '<input type="text" name="name" id="ffresponsename" size="40" /></div>' +
@@ -3840,7 +3847,7 @@
      if (val = $('[name="_' + hash_fields[i] + '"]').val())
        str += val + ':';
    str += this.editor.get_content();
    str += this.editor.get_content({refresh: false});
    if (this.env.attachments)
      for (id in this.env.attachments)