From 2d5f5470653ed75d9479bd2e771792478458d36b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 15 Nov 2019 09:33:43 +0100 Subject: Add focus() and blur() methods to Button class. --- src/main/kotlin/pl/treksoft/kvision/html/Button.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/kotlin/pl/treksoft/kvision') 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() + } } /** -- cgit