Skip to content

Commit caca4fc

Browse files
fix(client): add opacity for safari iframe visibility toggling (#403)
1 parent e34f98d commit caca4fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/client/src/components/common/IframeView.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ onMounted(() => {
2323
if (iframeCacheMap.get(key.value)) {
2424
iframeEl.value = iframeCacheMap.get(key.value)!
2525
iframeEl.value.style.visibility = 'visible'
26+
iframeEl.value.style.opacity = '1'
2627
iframeLoaded.value = true
2728
}
2829
else {
@@ -59,14 +60,17 @@ watchEffect(updateIframeBox)
5960
watchEffect(syncColorMode)
6061
6162
onUnmounted(() => {
62-
if (iframeEl.value)
63+
if (iframeEl.value) {
6364
iframeEl.value.style.visibility = 'hidden'
65+
iframeEl.value.style.opacity = '0'
66+
}
6467
})
6568
6669
function resolveConflictVisible() {
6770
if (!iframeEl.value)
6871
return
6972
iframeEl.value.style.visibility = 'visible'
73+
iframeEl.value.style.opacity = '1'
7074
}
7175
7276
function syncColorMode() {

0 commit comments

Comments
 (0)