瀏覽代碼

Added support for the shadowdom

Brian Grohe 5 年之前
父節點
當前提交
69aab8d2d3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/js/select2/dropdown/attachBody.js

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

@@ -195,7 +195,7 @@ define([
       left: 0
     };
 
-    if ($.contains(document.body, $offsetParent[0])) {
+    if ($.contains(document.body, $offsetParent[0]) || $offsetParent[0].isConnected) {
       parentOffset = $offsetParent.offset();
     }