From 762b23edfb748acc9d4e95305989b69057fb9c42 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 13 Oct 2010 08:35:08 +0000 Subject: - Fix googiespell click events handling git-svn-id: https://svn.roundcube.net/trunk@4082 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/googiespell.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/roundcubemail/program/js/googiespell.js b/roundcubemail/program/js/googiespell.js index 68ed4f6ee..aaea16c47 100644 --- a/roundcubemail/program/js/googiespell.js +++ b/roundcubemail/program/js/googiespell.js @@ -82,9 +82,10 @@ function GoogieSpell(img_dir, server_url) { // 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 @@ this.createEditLayer = function(width, height) { } 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.createLangWindow = function() { }; this.isLangWindowShown = function() { - return $(this.language_window).is(':hidden'); + return $(this.language_window).is(':visible'); }; this.hideLangWindow = function() { -- cgit v1.2.3