From 22b32614ea49ab4a96167ee54ec32611a7e60dc5 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Thu, 23 Aug 2012 15:28:24 -0700 Subject: [PATCH] Reevaluate dropdownCss when positioning dropdown --- select2.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/select2.js b/select2.js index c8120cb8..435e31aa 100755 --- a/select2.js +++ b/select2.js @@ -895,11 +895,11 @@ this.dropdown.removeClass("select2-drop-above"); } - css = { - top:dropTop, - left:offset.left, - width:width - }; + css = $.extend({ + top: dropTop, + left: offset.left, + width: width + }, evaluate(this.opts.dropdownCss)); this.dropdown.css(css); }, @@ -979,7 +979,6 @@ this.dropdown.show(); this.positionDropdown(); - this.dropdown.css(evaluate(this.opts.dropdownCss)); this.dropdown.addClass("select2-drop-active"); this.ensureHighlightVisible();