diff options
Diffstat (limited to 'kvision-modules/kvision-bootstrap')
-rw-r--r-- | kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt | 3 | ||||
-rw-r--r-- | kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt index cfdd36a9..82babb8f 100644 --- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt +++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Alert.kt @@ -90,6 +90,9 @@ open class Alert( hide() } } + shownBsModal = { + okButton.focus() + } } } diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt index 660c253c..5a97bf77 100644 --- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt +++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/modal/Confirm.kt @@ -21,6 +21,7 @@ */ package pl.treksoft.kvision.modal +import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.html.Align import pl.treksoft.kvision.html.Button import pl.treksoft.kvision.html.ButtonStyle @@ -136,6 +137,11 @@ open class Confirm( } this.addButton(yesButton) refreshCancelButton() + onEvent { + shownBsModal = { + yesButton.focus() + } + } } private fun refreshCancelButton() { |