2
0
mirror of https://github.com/PitPik/colorPicker.git synced 2025-09-07 08:12:36 -06:00

fixes position

This commit is contained in:
peterd 2016-02-02 17:18:14 +01:00
parent 720786e309
commit 91b3f2d618

View File

@ -98,7 +98,7 @@
var onOff = off ? 'removeEventListener' : 'addEventListener',
focusListener = function(e) {
var input = this,
position = {left: input.offsetLeft, top: input.offsetTop},
position = window.ColorPicker.getOrigin(input),
index = multiple ? Array.prototype.indexOf.call(elms, this) : 0,
colorPicker = colorPickers[index] ||
(colorPickers[index] = createInstance(this, config)),