Skip to content

Commit

Permalink
scroll when an alert happens
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom committed Nov 6, 2024
1 parent 5ec1821 commit 7a98543
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/dashboard/app/javascript/alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7a98543

Please sign in to comment.