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

Colors leak between colorpicker instances when model is updated from other sources #65

Closed
ProdigySim opened this issue Nov 13, 2014 · 4 comments

Comments

@ProdigySim
Copy link

I've built a mostly stripped-down codepen example where two colorpicker-enabled inputs sit on a page. The first input is just a normal colorpicker input. The second has its model color updated every second by a $interval callback.

I can produce "bleed" issues in two different ways on this page.

First:

  1. Load the page and wait for the color of the second input to change automatically.
  2. Click inside the first input to open colorpicker and note that the displayed color is not "pink".
  3. Click outside the input and back in again to reopen colorpicker, and note that the color changes each time this is done.

Second:

  1. Click inside the first input box to open colorpicker.
  2. Hold down click in the colorpicker to slowly pick a color.
  3. Keeping the mouse button held down, you will notice that every second the displayed color changes.
@buberdds
Copy link
Owner

Hey @ProdigySim,

ad1) $scope.hexPicker = {
color: 'pink'
};

'pink' is not a valid hex value?

ad2) if you gonna use proper values it's fine
second input is using rgba -> you are setting 'blue' and then assing hex values to rbga

@ProdigySim
Copy link
Author

Ah, I thought the different picker modes were just about formatting their output. That's a little disappointing if they can't accept arbitrary input.
I've updated the codepen example to use proper values, though: http://codepen.io/anon/pen/ZYYJYW

The first issue does not repro anymore (colorpicker showing random colors each time its opened).

However, the second issue I mentioned still exists on the updated codepen. Let me know if I've missed something else this time.

  1. Click inside the first input box to open colorpicker.
  2. Hold down click in the colorpicker to slowly pick a color.
  3. Keeping the mouse button held down, you will notice that every second the displayed color changes.

@buberdds
Copy link
Owner

what a crap, I'll try to look into this at the weekend.

@reymarx
Copy link

reymarx commented Mar 26, 2015

Hi @buberdds I'm curious what's the status on this.

We want to be able to use multiple colorpickers in the same view.

thanks

buberdds added a commit that referenced this issue Nov 28, 2015
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

3 participants