Scroll 'delete' and 'move' into view when expanded

This commit is contained in:
Pieter Vander Vennet 2023-01-04 19:12:54 +01:00
parent a7da5d65cf
commit ede03a31e4
2 changed files with 15 additions and 0 deletions

View file

@ -176,6 +176,13 @@ export default class DeleteWizard extends Toggle {
undefined,
isShown
)
const self = this
confirm.addCallbackAndRunD((dialogIsOpened) => {
if (dialogIsOpened) {
self.ScrollIntoView()
}
})
}
private static constructConfirmButton(

View file

@ -284,5 +284,13 @@ export default class MoveWizard extends Toggle {
]).SetClass("flex m-2 p-2 rounded-lg bg-gray-200"),
moveDisallowedReason.map((r) => r === undefined)
)
const self = this
currentStep.addCallback((state) => {
if (state === "start") {
return
}
self.ScrollIntoView()
})
}
}