浏览代码

Fix scroll caused by dropdown

lazything 10 年之前
父节点
当前提交
b7f4731051
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/js/select2/dropdown/attachBody.js

+ 2 - 1
src/js/select2/dropdown/attachBody.js

@@ -47,7 +47,8 @@ define([
     $dropdown.addClass('select2-container--open');
 
     $dropdown.css({
-      position: 'absolute'
+      position: 'absolute',
+      top: -999999
     });
 
     $dropdown.width($container.outerWidth(false));