mirror of
https://github.com/InsanusMokrassar/JSUIKitKBindings.git
synced 2026-10-28 23:13:04 +00:00
fixes in dialogs
This commit is contained in:
1 parent
ce5281c52d
commit
264bcae65e
1 file changed
+4
@@ -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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user