Stop focusing submit button in modals as this causes long modals to scroll to the bottom

This commit is contained in:
Andrew Kingston 2023-08-25 09:49:04 +01:00
parent 1210db575a
commit 71c092be1e
1 changed files with 0 additions and 8 deletions

View File

@ -60,14 +60,6 @@
if (inputs?.length) {
inputs[0].focus()
}
// Otherwise try to focus confirmation button
else if (modal) {
const confirm = modal.querySelector(".confirm-wrap .spectrum-Button")
if (confirm) {
confirm.focus()
}
}
}
setContext(Context.Modal, { show, hide, toggle, cancel })