From 238beca91b03634d56db656e8aa895153bdc1a33 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 26 Feb 2018 14:00:43 +0100 Subject: Unit tests compatibility with Firefox. --- src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision') diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index d3001b1d..4ab7c1d0 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -143,8 +143,10 @@ internal object KVManager { @Suppress("UnsafeCastFromDynamic") internal fun clearResizeEvent(component: Component) { - component.getElement()?.let { - elementResizeEvent.unbind(it) + if (component.getElement().asDynamic().__resizeTrigger__.contentDocument != null) { + component.getElement()?.let { + elementResizeEvent.unbind(it) + } } } } -- cgit