Ciicking on the Picker background span instead of Color Button span is firing a change event. Need to check if it is a button that was clicked.
click: function (e) {
alert('here');
var target = $(e.target);
if (target.length === 1) {
if (target[0].nodeName.toLowerCase() === 'span') {
if (target.attr('role') == 'button') { // FIXES
// When you click on a color, make it the new selected one
this.selectColorSpan(target);
this.$select.trigger('change');
}
}
}
},
Ciicking on the Picker background span instead of Color Button span is firing a change event. Need to check if it is a button that was clicked.