Closed RouNNdeL closed 5 years ago
did you try using event.stopPropagating()?
I was using 3.0.0-beta at the time. Since then the new change
event isn't triggered when using setValue
(colorpickerChange
is). So I manged to achieve the effects without event.stopPropagating()
. For anyone that comes across (any improvements to this code are welcome):
$(COLORPICKER_SELECTOR).on('change', function(e) {
if(update_all) {
$(COLORPICKER_SELECTOR).not($(this)).colorpicker("setValue", e.value);
}
}).colorpicker(COLORPICKER_OPTIONS);
yes I remember now it was fixed, sorry for the late response
Thanks for the response by the way. Gave it another go, to double check that event.stopPropagating()
solution, and I have it working now thanks to that :)
I'm trying to synchronize the values across multiple colorpickers when the user checks a checkbox. Right now every method that updates the colorpicker triggers the
onchange
event thus causing aRangeError: Maximum call stack size exceeded
. Is there any way to update the visuals of the picker without an event firing?