Closed calebroseland closed 8 years ago
Hi @calebroseland ,
thanks for your participation to colorPicker.
The implementations are not good and might be buggy. As soon as I have time I will redo the JS and the jQuery implementations.
I'm a bit sceptic about getBoundingClientRect
as it's relative to the viewport (offsetLeft
and Top
is definitely not correct). There is a function getOrigin
on the Class ColorPicker
. I changed the implementation including the present function and updated it on GitHub.
Maybe check if this is working for you otherwise I will refactor this whole thing earlier ;o)
Thanks again
Peter
P.S.: Make sure though that appendTo
is not set at all or to document.body
Hi, I encountered an issue where the offset position was incorrectly calculated, resulting in a misplaced color picker on focus.
-Use getBoundingClientRect instead of element offset to account for absolute positioned input elements.