Skip to content

Commit bd41065

Browse files
authored
Merge pull request #68 from hbcarlos/scroll
Fixes the scroll behavior of the code cell
2 parents eb3c9da + e6e9655 commit bd41065

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/blockly/src/layout.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ export class BlocklyLayout extends SplitLayout {
4747
rendermime
4848
});
4949
// Trust the outputs and set the mimeType for the code
50+
this._cell.addClass('jp-blockly-codeCell');
5051
this._cell.readOnly = true;
5152
this._cell.model.trusted = true;
5253
this._cell.model.mimeType = this._manager.mimeType;
54+
// adding the style to the element as a quick fix
55+
// we should make it work with the css class
56+
this._cell.node.style.overflow = 'scroll';
5357

5458
this._manager.changed.connect(this._onManagerChanged, this);
5559
}

packages/blockly/style/base.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
.jp-blockly-runButton:hover {
1010
background-color: var(--md-green-700);
1111
}
12+
13+
.jp-blockly-codeCell {
14+
overflow: scroll;
15+
}

0 commit comments

Comments
 (0)