From 3ff2b570ea7aedd4920d98aeafc41d0129a59c16 Mon Sep 17 00:00:00 2001 From: AndrejGajdos Date: Thu, 28 Jan 2016 16:38:46 +0100 Subject: [PATCH] picker height bug fix --- jquery.simplecolorpicker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jquery.simplecolorpicker.js b/jquery.simplecolorpicker.js index ac63238..854323c 100644 --- a/jquery.simplecolorpicker.js +++ b/jquery.simplecolorpicker.js @@ -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);