Skip to content

Commit

Permalink
fire change, not change.spectrum so that input change event fires at …
Browse files Browse the repository at this point in the history
…the same times as callbacks.change
  • Loading branch information
bgrins committed Jun 27, 2013
1 parent c755528 commit 7392b31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
addColorToSelectionPalette(color);
if (fireCallback && hasChanged) {
callbacks.change(color);
boundElement.trigger('change.spectrum', [ color ]);
boundElement.trigger('change', [ color ]);
}
}

Expand Down
3 changes: 1 addition & 2 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ test( "Events Fire", function() {

});

// change.spectrum
el.on("change.spectrum", function(e, color) {
el.on("change", function(e, color) {
ok(false, "Change should not fire from `set` call");
});

Expand Down

0 comments on commit 7392b31

Please sign in to comment.