iraychen / colorpickerjs

Automatically exported from code.google.com/p/colorpickerjs
MIT License
0 stars 0 forks source link

Multiple button problem #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Input some color buttons in a page.
2. Open first an close ok
3. Then open other an close it

What is the expected output? What do you see instead?
I hope close the second colorpicker but i have a jscript error when I 
click on the second button, then I can`t close the colorpicker image.

What version of the product are you using? On what operating system?
Verison 0.9 and 1.0 on IE6 on windows XP pro.

Please provide any additional information below.

In IE 7 it works. I foud the error on line 140 of colorpicker.js

replace this line:
    this.control.selector.style.left = Math.round(hsv[1] * 
this.control.pickerArea.offsetWidth) + "px";

by this one:
    this.control.selector.style.left = Math.round(hsv[0] * 
this.control.pickerArea.offsetWidth) + "px";

Then it works nice.

Original issue reported on code.google.com by andres...@gmail.com on 19 Sep 2008 at 9:59

GoogleCodeExporter commented 9 years ago
can you add the example? thanks

Original comment by matthias...@gmail.com on 23 Sep 2008 at 11:06