2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-09-24 16:40:57 -06:00

fix for pages with clickable SVG elements

This commit is contained in:
danielcwilliams 2016-06-08 22:29:47 -04:00
parent 41d780c31f
commit cc769c8609

View File

@ -135,7 +135,7 @@
colorPickerUI = (colorPicker ? colorPicker.nodes.colorPicker : undefined), colorPickerUI = (colorPicker ? colorPicker.nodes.colorPicker : undefined),
animationSpeed = colorPicker ? colorPicker.color.options.animationSpeed : 0, animationSpeed = colorPicker ? colorPicker.color.options.animationSpeed : 0,
isColorPicker = colorPicker && (function(elm) { isColorPicker = colorPicker && (function(elm) {
while (elm) { while (elm && elm instanceof HTMLElement) {
if ((elm.className || '').indexOf('cp-app') !== -1) return elm; if ((elm.className || '').indexOf('cp-app') !== -1) return elm;
elm = elm.parentNode; elm = elm.parentNode;
} }