aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-11-15 09:33:43 +0100
committerRobert Jaros <rjaros@finn.pl>2019-11-15 09:33:43 +0100
commit2d5f5470653ed75d9479bd2e771792478458d36b (patch)
tree5c226f463a3c203d4a2d8f0be2e3f74f4eb7e67d /src/main
parent77bf290155cbfa6d389c4937bf2a5a34dd5b33bd (diff)
downloadkvision-2d5f5470653ed75d9479bd2e771792478458d36b.tar.gz
kvision-2d5f5470653ed75d9479bd2e771792478458d36b.tar.bz2
kvision-2d5f5470653ed75d9479bd2e771792478458d36b.zip
Add focus() and blur() methods to Button class.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/html/Button.kt13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt
index ec1d95f5..44a9a8f3 100644
--- a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt
@@ -155,6 +155,19 @@ open class Button(
}
return this
}
+ /**
+ * Makes the button focused.
+ */
+ open fun focus() {
+ getElementJQuery()?.focus()
+ }
+
+ /**
+ * Makes the button blur.
+ */
+ open fun blur() {
+ getElementJQuery()?.blur()
+ }
}
/**