From 966209a7a0e6b62e2038db34134baab3c0dc0bb8 Mon Sep 17 00:00:00 2001 From: MattMo Date: Mon, 29 Sep 2025 07:30:20 -0700 Subject: [PATCH] Made it so the notification centers itself on the screen instead of scrolling the target element into view. Otherwise the notification gets cut off. --- ignite-html-validate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }