Open Daijobou opened 4 years ago
Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L306 call function toggle() without a DOM element, but in toggle() you catch always $this.offset() of $this = $(this) which not exists. Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L83
toggle()
$this.offset()
$this = $(this)
You get this, when you close a tinycolorpicker popup with click on the website.
maybe change line 83 to position = $this.length ? $this.offset() : null, could be a solution or put var position in if (event) block, there you only need it.
position = $this.length ? $this.offset() : null,
var position
if (event)
Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L306 call function toggle() without a DOM element, but in
toggle()
you catch always$this.offset()
of$this = $(this)
which not exists. Line https://github.com/PitPik/tinyColorPicker/blob/master/jqColorPicker.js#L83You get this, when you close a tinycolorpicker popup with click on the website.
maybe change line 83 to
position = $this.length ? $this.offset() : null,
could be a solution or putvar position
inif (event)
block, there you only need it.