From 82fd2db107380ed4ca41b36007cd2704ecb14749 Mon Sep 17 00:00:00 2001 From: Cristian Lorenzetto Date: Fri, 10 Feb 2017 14:59:54 +0100 Subject: [PATCH 1/3] fix bug if elem is a body --- dist/notify.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/notify.js b/dist/notify.js index fb9df63..fa9c85d 100644 --- a/dist/notify.js +++ b/dist/notify.js @@ -288,12 +288,13 @@ this.arrow = this.wrapper.find("." + pluginClassName + "-arrow"); this.container = this.wrapper.find("." + pluginClassName + "-container"); this.container.append(this.userContainer); - if (elem && elem.length) { + if (elem && elem.length &&!elem.is('body')) { this.elementType = elem.attr("type"); this.originalElement = elem; this.elem = getAnchorElement(elem); this.elem.data(pluginClassName, this); - this.elem.before(this.wrapper); + if (elem.is('body')) this.elem.append(this.wrapper); + else this.elem.before(this.wrapper); } this.container.hide(); this.run(data); From 5119822831e0c01beb96971efd0bd850b8eda536 Mon Sep 17 00:00:00 2001 From: publicocean0 Date: Fri, 10 Feb 2017 15:02:29 +0100 Subject: [PATCH 2/3] Update notify.js --- dist/notify.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dist/notify.js b/dist/notify.js index fa9c85d..989163d 100644 --- a/dist/notify.js +++ b/dist/notify.js @@ -293,8 +293,7 @@ this.originalElement = elem; this.elem = getAnchorElement(elem); this.elem.data(pluginClassName, this); - if (elem.is('body')) this.elem.append(this.wrapper); - else this.elem.before(this.wrapper); + this.elem.before(this.wrapper); } this.container.hide(); this.run(data); From df2bdf54ba34e08bf8358033ac1b7be6c1e7cf0f Mon Sep 17 00:00:00 2001 From: publicocean0 Date: Sat, 22 Jul 2017 23:38:41 +0200 Subject: [PATCH 3/3] Update notify.js --- dist/notify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/notify.js b/dist/notify.js index 989163d..fa9c85d 100644 --- a/dist/notify.js +++ b/dist/notify.js @@ -293,7 +293,8 @@ this.originalElement = elem; this.elem = getAnchorElement(elem); this.elem.data(pluginClassName, this); - this.elem.before(this.wrapper); + if (elem.is('body')) this.elem.append(this.wrapper); + else this.elem.before(this.wrapper); } this.container.hide(); this.run(data);