Changeset 3913 in subversion


Ignore:
Timestamp:
Aug 28, 2010 8:37:56 AM (3 years ago)
Author:
alec
Message:
  • Fix JS error on IE when trying to send HTML message with enabled spellchecker (#1486940)
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r3911 r3913  
    1313- Fix TinyMCE uses zh_CN when zh_TW locale is set (#1486929) 
    1414- Fix TinyMCE buttons are hidden in Opera (#1486922) 
     15- Fix JS error on IE when trying to send HTML message with enabled spellchecker (#1486940) 
    1516 
    1617RELEASE 0.4 
  • trunk/roundcubemail/program/js/app.js

    r3908 r3913  
    27532753  { 
    27542754    // check input fields 
    2755     var input_to = $("[name='_to']"); 
    2756     var input_cc = $("[name='_cc']"); 
    2757     var input_bcc = $("[name='_bcc']"); 
    2758     var input_from = $("[name='_from']"); 
    2759     var input_subject = $("[name='_subject']"); 
    2760     var input_message = $("[name='_message']"); 
     2755    var ed, input_to = $("[name='_to']"), 
     2756      input_cc = $("[name='_cc']"), 
     2757      input_bcc = $("[name='_bcc']"), 
     2758      input_from = $("[name='_from']"), 
     2759      input_subject = $("[name='_subject']"), 
     2760      input_message = $("[name='_message']"); 
    27612761 
    27622762    // check sender (if have no identities) 
     
    27962796    } 
    27972797 
     2798    // Apply spellcheck changes if spell checker is active 
     2799    this.stop_spellchecking(); 
     2800 
     2801    if (window.tinyMCE) 
     2802      ed = tinyMCE.get(this.env.composebody); 
     2803 
    27982804    // check for empty body 
    2799     if ((!window.tinyMCE || !tinyMCE.get(this.env.composebody)) 
    2800         && input_message.val() == '' && !confirm(this.get_label('nobodywarning'))) { 
     2805    if (!ed && input_message.val() == '' && !confirm(this.get_label('nobodywarning'))) { 
    28012806      input_message.focus(); 
    28022807      return false; 
    28032808    } 
    2804     else if (window.tinyMCE && tinyMCE.get(this.env.composebody) 
    2805         && !tinyMCE.get(this.env.composebody).getContent() 
    2806         && !confirm(this.get_label('nobodywarning'))) { 
    2807       tinyMCE.get(this.env.composebody).focus(); 
    2808       return false; 
    2809     } 
    2810  
    2811     // Apply spellcheck changes if spell checker is active 
    2812     this.stop_spellchecking(); 
    2813  
    2814     // move body from html editor to textarea (just to be sure, #1485860) 
    2815     if (window.tinyMCE && tinyMCE.get(this.env.composebody)) 
     2809    else if (ed) { 
     2810      if (!ed.getContent() && !confirm(this.get_label('nobodywarning'))) { 
     2811        ed.focus(); 
     2812        return false; 
     2813      } 
     2814      // move body from html editor to textarea (just to be sure, #1485860) 
    28162815      tinyMCE.triggerSave(); 
     2816    } 
    28172817 
    28182818    return true; 
     
    28462846  this.stop_spellchecking = function() 
    28472847  { 
    2848     if (this.env.spellcheck && !this.spellcheck_ready) { 
    2849       $(this.env.spellcheck.spell_span).trigger('click'); 
     2848    var ed; 
     2849    if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) { 
     2850      ed.execCommand('mceSpellCheck'); 
     2851    } 
     2852    else if ((ed = this.env.spellcheck) && !this.spellcheck_ready) { 
     2853      $(ed.spell_span).trigger('click'); 
    28502854      this.set_spellcheck_state('ready'); 
    28512855    } 
Note: See TracChangeset for help on using the changeset viewer.