From 5cf089dd724a94f072747f03e5253a76f2117552 Mon Sep 17 00:00:00 2001 From: Lars Westermann Date: Fri, 14 Jun 2019 11:22:51 +0200 Subject: [PATCH] Bugfixes calendar auto scroll --- .../kotlin/de/kif/frontend/views/calendar/Calendar.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/jsMain/kotlin/de/kif/frontend/views/calendar/Calendar.kt b/src/jsMain/kotlin/de/kif/frontend/views/calendar/Calendar.kt index ec63b6b..a0dcbaa 100644 --- a/src/jsMain/kotlin/de/kif/frontend/views/calendar/Calendar.kt +++ b/src/jsMain/kotlin/de/kif/frontend/views/calendar/Calendar.kt @@ -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() cell.dataset["room"] = it.toString()