From cc769c86098ccf80c75d73bc8a3022f5ca69bba3 Mon Sep 17 00:00:00 2001 From: danielcwilliams Date: Wed, 8 Jun 2016 22:29:47 -0400 Subject: [PATCH] fix for pages with clickable SVG elements --- javascript_implementation/jsColor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript_implementation/jsColor.js b/javascript_implementation/jsColor.js index 89febb6..0c8b144 100644 --- a/javascript_implementation/jsColor.js +++ b/javascript_implementation/jsColor.js @@ -135,7 +135,7 @@ colorPickerUI = (colorPicker ? colorPicker.nodes.colorPicker : undefined), animationSpeed = colorPicker ? colorPicker.color.options.animationSpeed : 0, isColorPicker = colorPicker && (function(elm) { - while (elm) { + while (elm && elm instanceof HTMLElement) { if ((elm.className || '').indexOf('cp-app') !== -1) return elm; elm = elm.parentNode; } @@ -233,4 +233,4 @@ (options.secure ? '; secure' : ''); } }; -})(this); \ No newline at end of file +})(this);