diff --git a/ignite-html-validate.js b/ignite-html-validate.js index a126fe6..a10232a 100644 --- a/ignite-html-validate.js +++ b/ignite-html-validate.js @@ -22,8 +22,6 @@ function notify(target, type, msg, duration) { color = "#10c469"; } - target.scrollIntoView({ behavior: "smooth" }); - if (target._validation && target._validation.isConnected) { target._validation.remove(); } @@ -91,6 +89,8 @@ function notify(target, type, msg, duration) { }, duration); } + notification.scrollIntoView({ behavior: "smooth", block: "center" }); + return notification; }