From 7a9854326ee097b59c13f46ed46394160b1d09e8 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Wed, 6 Nov 2024 16:18:53 -0500 Subject: [PATCH] scroll when an alert happens --- apps/dashboard/app/javascript/alert.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/dashboard/app/javascript/alert.js b/apps/dashboard/app/javascript/alert.js index 3817533008..b2ca7aac62 100644 --- a/apps/dashboard/app/javascript/alert.js +++ b/apps/dashboard/app/javascript/alert.js @@ -3,6 +3,7 @@ export function alert(message) { const div = alertDiv(message); const main = document.getElementById('main_container'); main.prepend(div); + div.scrollIntoView({ behavior: 'smooth' }); } function alertDiv(message) {