vendor/assets/javascripts/select2-full.js in select2-rails-4.0.11 vs vendor/assets/javascripts/select2-full.js in select2-rails-4.0.12

- old
+ new

@@ -1,7 +1,7 @@ /*! - * Select2 4.0.11 + * Select2 4.0.12 * https://select2.github.io * * Released under the MIT license * https://github.com/select2/select2/blob/master/LICENSE.md */ @@ -4496,10 +4496,13 @@ var parentOffset = { top: 0, left: 0 }; - if ($.contains(document.body, $offsetParent[0])) { + if ( + $.contains(document.body, $offsetParent[0]) || + $offsetParent[0].isConnected + ) { parentOffset = $offsetParent.offset(); } css.top -= parentOffset.top; css.left -= parentOffset.left;