Skip to content

Commit a91e71c

Browse files
committed
Fix random scrolls by jupyter lite
1 parent df78824 commit a91e71c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ui/notepad/notepad.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,14 @@ export class NoteScreenBase extends Component {
435435
position: 'relative',
436436
display: this.props.hidden ? 'none' : null
437437
}}
438+
onScroll={(event) => {
439+
// Fix, random scrolls initiated by Jupyter lite
440+
const el = event.currentTarget
441+
if (el.scrollTop !== 0) {
442+
console.log('scrollTop changed, resetting to 0')
443+
el.scrollTop = 0
444+
}
445+
}}
438446
>
439447
{this.props.showscreennumber && (
440448
<span

0 commit comments

Comments
 (0)