Browse Source

Allow passing non-jQuery objects as dropdownParent

Mikhail Titov 6 years ago
parent
commit
357c2a11c2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/select2/dropdown/attachBody.js

+ 1 - 1
src/js/select2/dropdown/attachBody.js

@@ -3,7 +3,7 @@ define([
   '../utils'
 ], function ($, Utils) {
   function AttachBody (decorated, $element, options) {
-    this.$dropdownParent = options.get('dropdownParent') || $(document.body);
+    this.$dropdownParent = $(options.get('dropdownParent') || document.body);
 
     decorated.call(this, $element, options);
   }