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";
|
color = "#10c469";
|
||||||
}
|
}
|
||||||
|
|
||||||
target.scrollIntoView({ behavior: "smooth" });
|
|
||||||
|
|
||||||
if (target._validation && target._validation.isConnected) {
|
if (target._validation && target._validation.isConnected) {
|
||||||
target._validation.remove();
|
target._validation.remove();
|
||||||
}
|
}
|
||||||
@@ -91,6 +89,8 @@ function notify(target, type, msg, duration) {
|
|||||||
}, duration);
|
}, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
notification.scrollIntoView({ behavior: "smooth", block: "center" });
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user