Skip to content

Commit

Permalink
fix(nipple): use document.body.contains for IE11 doesn't shortcut
Browse files Browse the repository at this point in the history
close #17
  • Loading branch information
yoannmoinet committed Nov 7, 2015
1 parent 207dbfd commit 6e5b80a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nipple.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Nipple.prototype.applyStyles = function (styles) {
// Inject the Nipple instance into DOM.
Nipple.prototype.addToDom = function () {
// We're not adding it if we're dataOnly or already in dom.
if (this.options.dataOnly || document.contains(this.ui.el)) {
if (this.options.dataOnly || document.body.contains(this.ui.el)) {
return;
}
this.manager.options.zone.appendChild(this.ui.el);
Expand All @@ -159,7 +159,7 @@ Nipple.prototype.addToDom = function () {

// Remove the Nipple instance from DOM.
Nipple.prototype.removeFromDom = function () {
if (this.options.dataOnly || !document.contains(this.ui.el)) {
if (this.options.dataOnly || !document.body.contains(this.ui.el)) {
return;
}
this.manager.options.zone.removeChild(this.ui.el);
Expand Down

0 comments on commit 6e5b80a

Please sign in to comment.