From 21d36308a9fc428f4d2b158d60c215f360aaf14c Mon Sep 17 00:00:00 2001 From: Derek Briggs Date: Tue, 25 May 2021 16:13:48 -0400 Subject: [PATCH] Fix bug that would cause new elements to be inserted at the wrong position. --- build.gradle | 2 +- src/main/kotlin/kweb/ElementCreator.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8f693b7992..2b90108a0b 100755 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ ext { } group 'com.github.kwebio' -version '0.9.9' +version '0.9.10' repositories { mavenCentral() diff --git a/src/main/kotlin/kweb/ElementCreator.kt b/src/main/kotlin/kweb/ElementCreator.kt index b9bcc6059e..50384b64a7 100755 --- a/src/main/kotlin/kweb/ElementCreator.kt +++ b/src/main/kotlin/kweb/ElementCreator.kt @@ -121,7 +121,7 @@ open class ElementCreator( } """.trimIndent() parent.callJsFunction(createElementJs, JsonPrimitive(tag), JsonObject(mutAttributes), JsonPrimitive(id), - JsonPrimitive(parent.id), JsonPrimitive(parent.id)) + JsonPrimitive(parent.id), JsonPrimitive(position)) } } val newElement = Element(parent.browser, this, tag = tag, id = id)