aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
index ffdcc045..d90c5769 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
@@ -89,8 +89,8 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
}
override fun afterDestroy() {
- document.getElementById("trix-input-" + trixId)?.remove()
- document.getElementById("trix-toolbar-" + trixId)?.remove()
+ document.getElementById("trix-input-" + trixId)?.let { jQuery(it).remove() }
+ document.getElementById("trix-toolbar-" + trixId)?.let { jQuery(it).remove() }
trixId = null
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
index 32994fc3..56a33690 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/TestUtil.kt
@@ -23,8 +23,8 @@ package test.pl.treksoft.kvision
import org.w3c.dom.Element
import pl.treksoft.jquery.jQuery
-import pl.treksoft.kvision.panel.Root
import pl.treksoft.kvision.core.Widget
+import pl.treksoft.kvision.panel.Root
import kotlin.browser.document
interface TestSpec {
@@ -59,7 +59,7 @@ interface DomSpec : TestSpec {
override fun afterTest() {
val div = document.getElementById("pretest")
- div?.remove()
+ div?.let { jQuery(it).remove() }
jQuery(`object` = ".modal-backdrop").remove()
}