Merge pull request #5691 from paxnovem/GH-5682
Fix support for the Shadow DOM when calculating offsets
This commit is contained in:
commit
1da125f11e
5
src/js/select2/dropdown/attachBody.js
vendored
5
src/js/select2/dropdown/attachBody.js
vendored
@ -195,7 +195,10 @@ define([
|
|||||||
left: 0
|
left: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($.contains(document.body, $offsetParent[0])) {
|
if (
|
||||||
|
$.contains(document.body, $offsetParent[0]) ||
|
||||||
|
$offsetParent[0].isConnected
|
||||||
|
) {
|
||||||
parentOffset = $offsetParent.offset();
|
parentOffset = $offsetParent.offset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user