Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Position of colopicker is not correct with some jQuery versions #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion jquery.simplecolorpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,16 @@

showPicker: function() {
var pos = this.$icon.offset();
var iconOutH = 0;
if (typeof this.$icon.outerHeight() === 'object'){
iconOutH = this.$icon.outerHeight(true);
} else {
iconOutH = this.$icon.outerHeight();
}
this.$picker.css({
// Remove some pixels to align the picker icon with the icons inside the dropdown
left: pos.left - 6,
top: pos.top + this.$icon.outerHeight()
top: pos.top + iconOutH
});

this.$picker.show(this.options.pickerDelay);
Expand Down