Skip to content

Commit

Permalink
fix(codemirror): fix codemirror editor showing nothing on start on sm…
Browse files Browse the repository at this point in the history
…all 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).
  • Loading branch information
pdanpdan authored Jan 3, 2024
1 parent 39e10f9 commit 6d7598d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/SplitPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ function dragEnd() {
@media (max-width: 720px) {
.left,
.right {
width: 100% !important;
height: 100% !important;
position: absolute;
inset: 0;
width: auto !important;
height: auto !important;
}
.dragger {
display: none;
Expand All @@ -172,13 +174,20 @@ function dragEnd() {
display: block;
}
.split-pane .right {
display: none;
z-index: -1;
pointer-events: none;
}
.split-pane .left {
z-index: 0;
pointer-events: all;
}
.split-pane.show-output .right {
display: block;
z-index: 0;
pointer-events: all;
}
.split-pane.show-output .left {
display: none;
z-index: -1;
pointer-events: none;
}
}
</style>

0 comments on commit 6d7598d

Please sign in to comment.