diff --git a/http/html/run.go b/http/html/run.go
index 8c88f79d1..49fe47699 100644
--- a/http/html/run.go
+++ b/http/html/run.go
@@ -139,7 +139,7 @@ func (app *Application) applyRun(w http.ResponseWriter, r *http.Request) {
writeError(w, err.Error(), http.StatusInternalServerError)
return
}
- http.Redirect(w, r, getRunPath(runRequest{workspaceRequest{r}}), http.StatusFound)
+ http.Redirect(w, r, getRunPath(runRequest{workspaceRequest{r}})+"#apply", http.StatusFound)
}
func (app *Application) discardRun(w http.ResponseWriter, r *http.Request) {
diff --git a/http/html/static/css/main.css b/http/html/static/css/main.css
index b74a56f1e..035945902 100644
--- a/http/html/static/css/main.css
+++ b/http/html/static/css/main.css
@@ -538,4 +538,5 @@ button.delete:hover {
#run-confirm-container {
display: flex;
gap: 1em;
+ margin-bottom: 1em;
}
diff --git a/http/html/static/js/main.js b/http/html/static/js/main.js
index 6f6ef7f81..70851eed1 100644
--- a/http/html/static/js/main.js
+++ b/http/html/static/js/main.js
@@ -118,6 +118,12 @@ function watchRunUpdates(path, stream, run) {
var actions = document.getElementById('run-confirm-container');
if (obj['run-status'] == 'planned') {
actions.style.display = 'flex';
+ // if user is at/near very bottom of page then scroll down to
+ // bring buttons into view.
+ atBottom = (Math.floor(window.scrollY) + window.innerHeight) >= (document.body.scrollHeight - 100);
+ if (atBottom) {
+ document.body.scrollIntoView(false);
+ }
} else {
actions.style.display = 'none';
}