Skip to content

Commit 97452ab

Browse files
core: frontend: BrIFrame: Change hiding approach
Instead of hiding the iframe with v-show (which sets display: none and gives zero dimensions), the iframe is now always visible but layered behind the loading animation using z-index positioning. Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent ae53ac1 commit 97452ab

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

core/frontend/src/components/utils/BrIframe.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
<v-sheet
33
width="100%"
44
height="100%"
5-
style="overflow: hidden;"
5+
style="overflow: hidden; position: relative;"
66
>
77
<spinning-logo
88
v-if="!gl_compatible && !iframe_loaded"
9+
class="full-overlay overlay"
910
size="15%"
1011
subtitle="Loading external application..."
1112
/>
1213
<canvas
1314
v-if="gl_compatible && !iframe_loaded"
1415
ref="webglCanvas"
16+
class="full-overlay overlay"
1517
/>
1618
<iframe
17-
v-show="iframe_loaded"
1819
:title="`iframe-${source}`"
1920
:src="source"
20-
height="100%"
21-
width="100%"
21+
class="full-overlay"
2222
frameBorder="0"
2323
allowfullscreen
2424
@load="loadFinished"
@@ -242,6 +242,19 @@ export default Vue.extend({
242242
})
243243
</script>
244244
<style scoped>
245+
.full-overlay {
246+
position: absolute;
247+
top: 0;
248+
left: 0;
249+
width: 100%;
250+
height: 100%;
251+
z-index: 1;
252+
}
253+
254+
.overlay {
255+
z-index: 2;
256+
}
257+
245258
iframe {
246259
display: block;
247260
}

0 commit comments

Comments
 (0)