Bugfixes calendar auto scroll

This commit is contained in:
Lars Westermann 2019-06-14 11:22:51 +02:00
parent d53b6f061d
commit 5cf089dd72
Signed by: lars.westermann
GPG key ID: 9D417FA5BB9D5E1D

View file

@ -7,6 +7,7 @@ import de.westermann.kwebview.View
import de.westermann.kwebview.createHtmlView
import de.westermann.kwebview.iterator
import org.w3c.dom.*
import org.w3c.dom.events.EventListener
import kotlin.browser.document
import kotlin.browser.window
import kotlin.js.Date
@ -153,6 +154,14 @@ class Calendar(calendar: HTMLElement) : View(calendar) {
it.preventDefault()
}
onMouseDown {
autoScroll = false
}
html.addEventListener("touchstart", EventListener {
autoScroll = false
})
RoomRepository.onCreate {
val cell = createHtmlView<HTMLElement>()
cell.dataset["room"] = it.toString()