forked from MapComplete/MapComplete
Scroll 'delete' and 'move' into view when expanded
This commit is contained in:
parent
a7da5d65cf
commit
ede03a31e4
2 changed files with 15 additions and 0 deletions
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue