From 65d0583b7fc1922d916243b63e43c9d9be8f8723 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 5 May 2013 17:31:40 -0700 Subject: [PATCH] Fix Rice on Opera. --- builds/appchan-x.js | 8 ++++---- builds/appchan-x.user.js | 8 ++++---- builds/crx/script.js | 8 ++++---- src/Theming/Rice.coffee | 7 ++++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/builds/appchan-x.js b/builds/appchan-x.js index c0f2fac26..435693c7b 100644 --- a/builds/appchan-x.js +++ b/builds/appchan-x.js @@ -10767,7 +10767,9 @@ }); }, cb: { - check: function() { + check: function(e) { + e.preventDefault(); + e.stopPropagation(); return this.check.click(); }, option: function(e) { @@ -10862,9 +10864,7 @@ }); div.check = input; $.after(input, div); - if (div.parentElement.tagName !== 'LABEL') { - return $.on(div, 'click', Rice.cb.check); - } + return $.on(div, 'click', Rice.cb.check); }, select: function(select) { var div; diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 35dfb2f9d..516c78f15 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -10788,7 +10788,9 @@ }); }, cb: { - check: function() { + check: function(e) { + e.preventDefault(); + e.stopPropagation(); return this.check.click(); }, option: function(e) { @@ -10883,9 +10885,7 @@ }); div.check = input; $.after(input, div); - if (div.parentElement.tagName !== 'LABEL') { - return $.on(div, 'click', Rice.cb.check); - } + return $.on(div, 'click', Rice.cb.check); }, select: function(select) { var div; diff --git a/builds/crx/script.js b/builds/crx/script.js index 56cd1c4cd..326671485 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10770,7 +10770,9 @@ }); }, cb: { - check: function() { + check: function(e) { + e.preventDefault(); + e.stopPropagation(); return this.check.click(); }, option: function(e) { @@ -10865,9 +10867,7 @@ }); div.check = input; $.after(input, div); - if (div.parentElement.tagName !== 'LABEL') { - return $.on(div, 'click', Rice.cb.check); - } + return $.on(div, 'click', Rice.cb.check); }, select: function(select) { var div; diff --git a/src/Theming/Rice.coffee b/src/Theming/Rice.coffee index 1d94a13a1..ac940db59 100644 --- a/src/Theming/Rice.coffee +++ b/src/Theming/Rice.coffee @@ -8,7 +8,9 @@ Rice = cb: @node cb: - check: -> + check: (e)-> + e.preventDefault() + e.stopPropagation() @check.click() option: (e) -> @@ -90,8 +92,7 @@ Rice = className: 'rice' div.check = input $.after input, div - if div.parentElement.tagName isnt 'LABEL' - $.on div, 'click', Rice.cb.check + $.on div, 'click', Rice.cb.check select: (select) -> $.addClass select, 'riced'