浏览代码

fixed dropdown positioning when select2 has margins. fixes #501

Igor Vaynberg 12 年之前
父节点
当前提交
3ed91862fa
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      select2.js

+ 3 - 3
select2.js

@@ -883,9 +883,9 @@ the specific language governing permissions and limitations under the Apache Lic
         // abstract
         // abstract
         positionDropdown: function() {
         positionDropdown: function() {
             var offset = this.container.offset(),
             var offset = this.container.offset(),
-                height = this.container.outerHeight(true),
-                width = this.container.outerWidth(true),
-                dropHeight = this.dropdown.outerHeight(true),
+                height = this.container.outerHeight(false),
+                width = this.container.outerWidth(false),
+                dropHeight = this.dropdown.outerHeight(false),
                 viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight,
                 viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight,
                 dropTop = offset.top + height,
                 dropTop = offset.top + height,
                 dropLeft = offset.left,
                 dropLeft = offset.left,