From 48e8b31b1eaa0bdadd39603150ae8c522d394664 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 13 Oct 2010 04:35:08 -0400
Subject: [PATCH] - Fix googiespell click events handling

---
 program/js/googiespell.js |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/program/js/googiespell.js b/program/js/googiespell.js
index 68ed4f6..aaea16c 100644
--- a/program/js/googiespell.js
+++ b/program/js/googiespell.js
@@ -82,9 +82,10 @@
 
     // Set document's onclick to hide the language and error menu
     $(document).bind('click', function(e) {
-        if($(e.target).attr('googie_action_btn') != '1' && ref.isLangWindowShown())
+        var target = $(e.target);
+        if(target.attr('googie_action_btn') != '1' && ref.isLangWindowShown())
 	        ref.hideLangWindow();
-	    if($(e.target).attr('googie_action_btn') != '1' && ref.isErrorWindowShown())
+	    if(target.attr('googie_action_btn') != '1' && ref.isErrorWindowShown())
             ref.hideErrorWindow();
     });
 
@@ -577,8 +578,9 @@
     }
 
     var ref = this;
+
     if (this.edit_layer_dbl_click) {
-        $(this.edit_layer).bind('click', function(e) {
+        $(this.edit_layer).dblclick(function(e) {
             if (e.target.className != 'googie_link' && !ref.isErrorWindowShown()) {
                 ref.resumeEditing();
                 var fn1 = function() {
@@ -766,7 +768,7 @@
 };
 
 this.isLangWindowShown = function() {
-    return $(this.language_window).is(':hidden');
+    return $(this.language_window).is(':visible');
 };
 
 this.hideLangWindow = function() {

--
Gitblit v1.9.1