mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2024-11-30 05:58:45 +00:00
fixes in dialogs
This commit is contained in:
parent
ce5281c52d
commit
264bcae65e
@ -54,6 +54,8 @@ fun Dialog(
|
|||||||
|
|
||||||
if (onHidden != null || removeOnHide) {
|
if (onHidden != null || removeOnHide) {
|
||||||
htmlElement.addEventListener("hidden", {
|
htmlElement.addEventListener("hidden", {
|
||||||
|
if (it.target != htmlElement) return@addEventListener
|
||||||
|
|
||||||
onHidden ?.invoke(htmlElement)
|
onHidden ?.invoke(htmlElement)
|
||||||
|
|
||||||
if (removeOnHide) {
|
if (removeOnHide) {
|
||||||
@ -64,6 +66,8 @@ fun Dialog(
|
|||||||
|
|
||||||
onShown ?.let {
|
onShown ?.let {
|
||||||
htmlElement.addEventListener("shown", {
|
htmlElement.addEventListener("shown", {
|
||||||
|
if (it.target != htmlElement) return@addEventListener
|
||||||
|
|
||||||
onShown(htmlElement)
|
onShown(htmlElement)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user