From ec7fab2a7a506dbafd56cc46cb69494af96c7d1a Mon Sep 17 00:00:00 2001 From: Gregoo Date: Mon, 3 Feb 2025 16:35:09 +0100 Subject: [PATCH] Scroll confirm and progress to view when adding a set through the socket --- static/scripts/socket/set.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/scripts/socket/set.js b/static/scripts/socket/set.js index a7e660b..d561261 100644 --- a/static/scripts/socket/set.js +++ b/static/scripts/socket/set.js @@ -163,6 +163,10 @@ class BrickSetSocket extends BrickSocket { this.spinner(true); + if (this.html_progress_bar) { + this.html_progress_bar.scrollIntoView(); + } + this.socket.emit(this.messages.IMPORT_SET, { set: (set !== undefined) ? set : this.html_input.value, owners: owners, @@ -240,6 +244,8 @@ class BrickSetSocket extends BrickSocket { })(this, data["set"]); this.html_card_confirm.addEventListener("click", this.confirm_listener); + + this.html_card_confirm.scrollIntoView(); } } }