From 898249d72793e169e64ecfdada86ccae2e7d7814 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 17 Oct 2008 02:42:12 -0400
Subject: [PATCH] #1485506: close spellchecker before sending the message
---
program/js/app.js | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/program/js/app.js b/program/js/app.js
index bea1dc4..fc99871 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1989,23 +1989,31 @@
return false;
}
+ // Apply spellcheck changes if spell checker is active
+ this.stop_spellchecking();
+
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)
- {
+ {
if (this.env.spellcheck) {
// stop spellchecking process
if (!vis && !this.spellcheck_ready)
- {
- exec_event(this.env.spellcheck.check_link, 'click');
- this.set_spellcheck_state('ready');
- }
+ this.stop_spellchecking();
this.env.spellcheck.check_link.style.visibility = vis ? 'visible' : 'hidden';
this.env.spellcheck.switch_lan_pic.style.visibility = vis ? 'visible' : 'hidden';
- }
- };
+ }
+ };
this.set_spellcheck_state = function(s)
{
--
Gitblit v1.9.1