Skip to content

Commit e716ad0

Browse files
author
Dementiy Kalkov
committed
'document.body' instead of 'body' selector
1 parent eb0b9ff commit e716ad0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

select2.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ the specific language governing permissions and limitations under the Apache Lic
132132

133133
function measureScrollbar () {
134134
var $template = $( MEASURE_SCROLLBAR_TEMPLATE );
135-
$template.appendTo('body');
135+
$template.appendTo(document.body);
136136

137137
var dim = {
138138
width: $template.width() - $template[0].clientWidth,
@@ -311,7 +311,7 @@ the specific language governing permissions and limitations under the Apache Lic
311311
whiteSpace: "nowrap"
312312
});
313313
sizer.attr("class","select2-sizer");
314-
$("body").append(sizer);
314+
$(document.body).append(sizer);
315315
}
316316
sizer.text(e.val());
317317
return sizer.width();
@@ -717,7 +717,7 @@ the specific language governing permissions and limitations under the Apache Lic
717717

718718
this.container.attr("title", opts.element.attr("title"));
719719

720-
this.body = $("body");
720+
this.body = $(document.body);
721721

722722
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
723723

0 commit comments

Comments
 (0)