Skip to content

Commit 9a1e318

Browse files
committed
minor #594 [Live] Tweak rendering of the error screen (1ed)
This PR was merged into the 2.x branch. Discussion ---------- [Live] Tweak rendering of the error screen | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | - | License | MIT Before: ![image](https://user-images.githubusercontent.com/162986/205930272-2fb1b887-fa88-4807-86ef-3f14b90a97a0.png) After: ![image](https://user-images.githubusercontent.com/162986/205930126-2202cb08-22ee-481c-a507-a367a7cc8e07.png) Commits ------- 590f41b [Live] Tweak rendering of the error screen
2 parents 4bd27ef + 590f41b commit 9a1e318

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,13 +1594,16 @@ class Component {
15941594
modal.style.backgroundColor = 'rgba(0, 0, 0, .5)';
15951595
modal.style.zIndex = '100000';
15961596
modal.style.position = 'fixed';
1597-
modal.style.width = '100vw';
1598-
modal.style.height = '100vh';
1597+
modal.style.top = '0px';
1598+
modal.style.bottom = '0px';
1599+
modal.style.left = '0px';
1600+
modal.style.right = '0px';
1601+
modal.style.display = 'flex';
1602+
modal.style.flexDirection = 'column';
15991603
}
16001604
const iframe = document.createElement('iframe');
16011605
iframe.style.borderRadius = '5px';
1602-
iframe.style.width = '100%';
1603-
iframe.style.height = '100%';
1606+
iframe.style.flexGrow = '1';
16041607
modal.appendChild(iframe);
16051608
document.body.prepend(modal);
16061609
document.body.style.overflow = 'hidden';

src/LiveComponent/assets/src/Component/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,17 @@ export default class Component {
435435
modal.style.backgroundColor = 'rgba(0, 0, 0, .5)';
436436
modal.style.zIndex = '100000';
437437
modal.style.position = 'fixed';
438-
modal.style.width = '100vw';
439-
modal.style.height = '100vh';
438+
modal.style.top = '0px';
439+
modal.style.bottom = '0px';
440+
modal.style.left = '0px';
441+
modal.style.right = '0px';
442+
modal.style.display = 'flex';
443+
modal.style.flexDirection = 'column';
440444
}
441445

442446
const iframe = document.createElement('iframe');
443447
iframe.style.borderRadius = '5px';
444-
iframe.style.width = '100%';
445-
iframe.style.height = '100%';
448+
iframe.style.flexGrow = '1';
446449
modal.appendChild(iframe);
447450

448451
document.body.prepend(modal);

0 commit comments

Comments
 (0)