Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change event fired on CTRL-V #230

Open
aesteve opened this issue Jul 11, 2014 · 7 comments
Open

Change event fired on CTRL-V #230

aesteve opened this issue Jul 11, 2014 · 7 comments

Comments

@aesteve
Copy link

aesteve commented Jul 11, 2014

The documention (http://bgrins.github.io/spectrum/#events-change) says :
"Called as the original input changes. Only happens when the input is closed or the 'Choose' button is clicked."

But, when I paste some color in the text input using CTRL-V, the event is fired.

Same thing happens when I click out of the color box but don't click on "cancel". The change event is fired. (note : but not when I set 'clickoutFiresChange' to false, which is the expected behaviour I suppose).

This means that when a color was picked (red), I paste some other color in the input field (blue), then click on 'Cancel', the input field has the blue color in it anyway. But with angularjs-spectrum-colorpicker, the model is not updated for instance.

Is this the behaviour you expect for onChange event ?

@jbalboni
Copy link

It seems intentional, based on this: #122

This is causing me trouble, too. It seems like it shouldn't fire the change event when showButtons is true.

@bgrins
Copy link
Owner

bgrins commented Aug 22, 2014

Yes, seems like typing in the field should be treated as if the color was changed by dragging with the mouse.

@bgrins
Copy link
Owner

bgrins commented Aug 28, 2014

Working on this in #230

@bgrins
Copy link
Owner

bgrins commented Aug 28, 2014

#242, rather

@bgrins
Copy link
Owner

bgrins commented Sep 3, 2014

This should be fixed now on master, by #242. Can you either of you confirm?

@bgrins bgrins closed this as completed Sep 3, 2014
@bgrins
Copy link
Owner

bgrins commented Sep 3, 2014

Actually, this isn't fixed yet

@marcandre
Copy link
Contributor

As I wrote in #250, I think the doc should be changed, and that it is good that a change event is fired when pasting, or clicking in the palette, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants