diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/KVManager.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index ab4f7e13..0030cf9d 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -30,6 +30,7 @@ import com.github.snabbdom.eventListenersModule import com.github.snabbdom.propsModule import com.github.snabbdom.styleModule import pl.treksoft.kvision.core.Component +import pl.treksoft.kvision.utils.isIE11 import kotlin.browser.document import kotlin.dom.clear @@ -136,16 +137,20 @@ internal object KVManager { @Suppress("UnsafeCastFromDynamic") internal fun setResizeEvent(component: Component, callback: () -> Unit) { - component.getElement()?.let { - elementResizeEvent(it, callback) + if (!isIE11()) { + component.getElement()?.let { + elementResizeEvent(it, callback) + } } } @Suppress("UnsafeCastFromDynamic") internal fun clearResizeEvent(component: Component) { - if (component.getElement()?.asDynamic()?.__resizeTrigger__?.contentDocument != null) { - component.getElement()?.let { - elementResizeEvent.unbind(it) + if (!isIE11()) { + if (component.getElement()?.asDynamic()?.__resizeTrigger__?.contentDocument != null) { + component.getElement()?.let { + elementResizeEvent.unbind(it) + } } } } |