Skip to content

Commit 6d7598d

Browse files
authored
fix(codemirror): fix codemirror editor showing nothing on start on small layouts when starting in ouput mode (#181)
CodeMirror Editor tries to auto-size when it starts. If the Repl start in Output mode on small layouts CodeMirror will not be able to autosize because it has `display: none`. From the POV of user the only solution is to change editor tabs to see the code (if it has more tabs).
1 parent 39e10f9 commit 6d7598d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/SplitPane.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ function dragEnd() {
162162
@media (max-width: 720px) {
163163
.left,
164164
.right {
165-
width: 100% !important;
166-
height: 100% !important;
165+
position: absolute;
166+
inset: 0;
167+
width: auto !important;
168+
height: auto !important;
167169
}
168170
.dragger {
169171
display: none;
@@ -172,13 +174,20 @@ function dragEnd() {
172174
display: block;
173175
}
174176
.split-pane .right {
175-
display: none;
177+
z-index: -1;
178+
pointer-events: none;
179+
}
180+
.split-pane .left {
181+
z-index: 0;
182+
pointer-events: all;
176183
}
177184
.split-pane.show-output .right {
178-
display: block;
185+
z-index: 0;
186+
pointer-events: all;
179187
}
180188
.split-pane.show-output .left {
181-
display: none;
189+
z-index: -1;
190+
pointer-events: none;
182191
}
183192
}
184193
</style>

0 commit comments

Comments
 (0)