summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-10-13 08:35:08 +0000
committeralecpl <alec@alec.pl>2010-10-13 08:35:08 +0000
commit48e8b31b1eaa0bdadd39603150ae8c522d394664 (patch)
treecb1f39e6ba082675bbfd80eecfd57a22f85209dc /program
parentf75adec3e701806b300c1d7de409afc681911f7f (diff)
- Fix googiespell click events handling
Diffstat (limited to 'program')
-rw-r--r--program/js/googiespell.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/program/js/googiespell.js b/program/js/googiespell.js
index 68ed4f6ee..aaea16c47 100644
--- a/program/js/googiespell.js
+++ b/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() {