diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-02-27 14:21:19 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-02-27 14:21:19 +0100 |
commit | 8163f730f4b195160b5b9ca4202c1f304ac68b27 (patch) | |
tree | 8ec4fc4c2159a133ee2320dba21b10df2102be70 /src/main/kotlin/pl/treksoft/kvision/KVManager.kt | |
parent | 1dbc0ccd0f1a8b0b5afc99457af0a34a4d4b1b6b (diff) | |
download | kvision-8163f730f4b195160b5b9ca4202c1f304ac68b27.tar.gz kvision-8163f730f4b195160b5b9ca4202c1f304ac68b27.tar.bz2 kvision-8163f730f4b195160b5b9ca4202c1f304ac68b27.zip |
Internet Explorer and Edge compatibility fixes.
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) + } } } } |