Tooltip outside props

commit_hash:0adbc8d8998913cf507d93951d06d45dee9c8eac
This commit is contained in:
4eb0da
2025-03-04 14:02:35 +03:00
parent f8b1bd5733
commit 267c232d9d
3 changed files with 19 additions and 4 deletions
@@ -172,7 +172,15 @@
event.stopPropagation();
event.preventDefault();
rootCtx.onTooltipClose(internalId);
if (componentContext.getJsonWithVars(data.close_by_tap_outside) !== false) {
rootCtx.onTooltipClose(internalId);
}
if (data.tap_outside_actions) {
componentContext.execAnyActions(data.tap_outside_actions, {
processUrls: true
});
}
}
function onWindowResize(): void {
@@ -205,10 +213,13 @@
</script>
<svelte:window
on:click={onOutClick}
on:resize={onWindowResize}
/>
<svelte:body
on:click={onOutClick}
/>
{#if visible && modal}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
+2
View File
@@ -121,6 +121,8 @@ export interface Tooltip {
animation_out?: Animation;
mode?: TooltipMode;
tap_outside_actions?: Action[];
close_by_tap_outside?: boolean;
}
export interface DivLayoutProvider {
+4 -2
View File
@@ -72,7 +72,8 @@
},
"$description": "translations.json#/div_tooltip_tap_outside_actions",
"platforms": [
"ios"
"ios",
"web"
]
},
"close_by_tap_outside": {
@@ -81,7 +82,8 @@
"default_value": "true",
"platforms": [
"android",
"ios"
"ios",
"web"
]
},
"background_accessibility_description": {