Skip to content

Commit

Permalink
Merge pull request #5691 from paxnovem/GH-5682
Browse files Browse the repository at this point in the history
Fix support for the Shadow DOM when calculating offsets
  • Loading branch information
kevin-brown committed Nov 6, 2019
2 parents e809aa0 + 69bcf1a commit 1da125f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/select2/dropdown/attachBody.js
Expand Up @@ -195,7 +195,10 @@ define([
left: 0
};

if ($.contains(document.body, $offsetParent[0])) {
if (
$.contains(document.body, $offsetParent[0]) ||
$offsetParent[0].isConnected
) {
parentOffset = $offsetParent.offset();
}

Expand Down

0 comments on commit 1da125f

Please sign in to comment.