vendor/assets/javascripts/select2-full.js in select2-rails-4.0.10 vs vendor/assets/javascripts/select2-full.js in select2-rails-4.0.11
- old
+ new
@@ -1,7 +1,7 @@
/*!
- * Select2 4.0.10
+ * Select2 4.0.11
* https://select2.github.io
*
* Released under the MIT license
* https://github.com/select2/select2/blob/master/LICENSE.md
*/
@@ -4491,10 +4491,17 @@
// that is determining the offset
if ($offsetParent.css('position') === 'static') {
$offsetParent = $offsetParent.offsetParent();
}
- var parentOffset = $offsetParent.offset();
+ var parentOffset = {
+ top: 0,
+ left: 0
+ };
+
+ if ($.contains(document.body, $offsetParent[0])) {
+ parentOffset = $offsetParent.offset();
+ }
css.top -= parentOffset.top;
css.left -= parentOffset.left;
if (!isCurrentlyAbove && !isCurrentlyBelow) {