mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Fix scrolling output not working
by adding a conditional for the append output height reset.
This commit is contained in:
parent
b8d7197ec6
commit
6f0bbe91e1
@ -291,8 +291,10 @@ var IPython = (function (IPython) {
|
||||
this.expand();
|
||||
|
||||
// Clear the output if clear is queued.
|
||||
var needs_height_reset = false;
|
||||
if (this.clear_queued) {
|
||||
this.clear_output(false);
|
||||
needs_height_reset = true;
|
||||
}
|
||||
|
||||
if (json.output_type === 'pyout') {
|
||||
@ -305,7 +307,13 @@ var IPython = (function (IPython) {
|
||||
this.append_stream(json);
|
||||
}
|
||||
this.outputs.push(json);
|
||||
this.element.height('auto');
|
||||
|
||||
// Only reset the height to automatic if the height is currently
|
||||
// fixed (done by wait=True flag on clear_output).
|
||||
if (needs_height_reset) {
|
||||
this.element.height('auto');
|
||||
}
|
||||
|
||||
var that = this;
|
||||
setTimeout(function(){that.element.trigger('resize');}, 100);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user