Skip to content

Commit

Permalink
fix(client): add opacity for safari iframe visibility toggling (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelandrewrm authored May 29, 2024
1 parent e34f98d commit caca4fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/client/src/components/common/IframeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ onMounted(() => {
if (iframeCacheMap.get(key.value)) {
iframeEl.value = iframeCacheMap.get(key.value)!
iframeEl.value.style.visibility = 'visible'
iframeEl.value.style.opacity = '1'
iframeLoaded.value = true
}
else {
Expand Down Expand Up @@ -59,14 +60,17 @@ watchEffect(updateIframeBox)
watchEffect(syncColorMode)
onUnmounted(() => {
if (iframeEl.value)
if (iframeEl.value) {
iframeEl.value.style.visibility = 'hidden'
iframeEl.value.style.opacity = '0'
}
})
function resolveConflictVisible() {
if (!iframeEl.value)
return
iframeEl.value.style.visibility = 'visible'
iframeEl.value.style.opacity = '1'
}
function syncColorMode() {
Expand Down

0 comments on commit caca4fc

Please sign in to comment.