소스 검색

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();
     }