Made it so the notification centers itself on the screen instead of scrolling the target element into view. Otherwise the notification gets cut off.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user