Skip to content

Commit 272a8df

Browse files
committed
Try to replace CSS visibility with opacity
This is testing for a fix for Safari, in which Safari does not respect `visibility: hidden` on our `<iframe>`
1 parent a0468ca commit 272a8df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/supervisor/frontend/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const ideService = IDEFrontendService.create();
6464
const loadingIDE = new Promise((resolve) => window.addEventListener("DOMContentLoaded", resolve, { once: true }));
6565
const toStop = new DisposableCollection();
6666

67-
document.body.style.visibility = "hidden";
67+
document.body.style.opacity = "0";
6868
LoadingFrame.load().then(async (loading) => {
6969
const frontendDashboardServiceClient = loading.frontendDashboardServiceClient;
7070
await frontendDashboardServiceClient.initialize();
@@ -162,8 +162,8 @@ LoadingFrame.load().then(async (loading) => {
162162
if (current === newCurrent) {
163163
return;
164164
}
165-
current.style.visibility = "hidden";
166-
newCurrent.style.visibility = "visible";
165+
current.style.opacity = "0";
166+
newCurrent.style.opacity = "1";
167167
if (current === document.body) {
168168
while (document.body.firstChild && document.body.firstChild !== newCurrent) {
169169
document.body.removeChild(document.body.firstChild);

components/supervisor/frontend/src/shared/loading-frame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function load(): Promise<{
1414
return new Promise((resolve) => {
1515
const frame = document.createElement("iframe");
1616
frame.src = startUrl.toString();
17-
frame.style.visibility = "visible";
17+
frame.style.opacity = "1";
1818
frame.className = "gitpod-frame loading";
1919
document.body.appendChild(frame);
2020

0 commit comments

Comments
 (0)