#1485506: close spellchecker before sending the message

release-0.6
alecpl 16 years ago
parent b685e9e47c
commit 898249d727

@ -1989,23 +1989,31 @@ function rcube_webmail()
return false; return false;
} }
// Apply spellcheck changes if spell checker is active
this.stop_spellchecking();
return true; return true;
}; };
this.stop_spellchecking = function()
{
if (this.env.spellcheck && !this.spellcheck_ready) {
exec_event(this.env.spellcheck.check_link, 'click');
this.set_spellcheck_state('ready');
}
};
this.display_spellcheck_controls = function(vis) this.display_spellcheck_controls = function(vis)
{ {
if (this.env.spellcheck) { if (this.env.spellcheck) {
// stop spellchecking process // stop spellchecking process
if (!vis && !this.spellcheck_ready) if (!vis && !this.spellcheck_ready)
{ this.stop_spellchecking();
exec_event(this.env.spellcheck.check_link, 'click');
this.set_spellcheck_state('ready');
}
this.env.spellcheck.check_link.style.visibility = vis ? 'visible' : 'hidden'; this.env.spellcheck.check_link.style.visibility = vis ? 'visible' : 'hidden';
this.env.spellcheck.switch_lan_pic.style.visibility = vis ? 'visible' : 'hidden'; this.env.spellcheck.switch_lan_pic.style.visibility = vis ? 'visible' : 'hidden';
} }
}; };
this.set_spellcheck_state = function(s) this.set_spellcheck_state = function(s)
{ {

Loading…
Cancel
Save