Skip to content

Commit bd40e10

Browse files
devvaannshabose
authored andcommitted
fix: don't show overlay message no a no-preview html page
1 parent c1214d1 commit bd40e10

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/LiveDevelopment/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ define(function main(require, exports, module) {
4343
ExtensionUtils = require("utils/ExtensionUtils"),
4444
StringUtils = require("utils/StringUtils"),
4545
EventDispatcher = require("utils/EventDispatcher"),
46-
WorkspaceManager = require("view/WorkspaceManager");
46+
WorkspaceManager = require("view/WorkspaceManager"),
47+
EditorManager = require("editor/EditorManager");
4748

4849

4950
// this is responsible to make the advanced live preview features active or inactive
@@ -453,6 +454,7 @@ define(function main(require, exports, module) {
453454
});
454455
// to understand why we need this, pls read the _setOverlayWidth function
455456
new ResizeObserver(_setOverlayWidth).observe($("#main-plugin-panel")[0]);
457+
EditorManager.on("activeEditorChange", _hideOverlay);
456458

457459
// allow live preview to handle escape key event
458460
// Escape is mainly to hide boxes if they are visible

src/extensionsIntegrated/Phoenix-live-preview/live-preview.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

2323
#panel-live-preview-frame{
2424
background-color: white;
25+
position: relative;
26+
}
27+
28+
#panel-live-preview-frame[src*="no-preview.html"],
29+
#panel-live-preview-frame[src*="live-preview-error.html"] {
30+
z-index: 200;
2531
}
2632

2733
#panel-live-preview-title {
@@ -156,6 +162,7 @@
156162
position: absolute;
157163
top: 30px;
158164
left: 3px;
165+
z-index: 100;
159166
}
160167

161168
.live-preview-status-overlay.full-width {

0 commit comments

Comments
 (0)