mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +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();
|
this.expand();
|
||||||
|
|
||||||
// Clear the output if clear is queued.
|
// Clear the output if clear is queued.
|
||||||
|
var needs_height_reset = false;
|
||||||
if (this.clear_queued) {
|
if (this.clear_queued) {
|
||||||
this.clear_output(false);
|
this.clear_output(false);
|
||||||
|
needs_height_reset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json.output_type === 'pyout') {
|
if (json.output_type === 'pyout') {
|
||||||
@ -305,7 +307,13 @@ var IPython = (function (IPython) {
|
|||||||
this.append_stream(json);
|
this.append_stream(json);
|
||||||
}
|
}
|
||||||
this.outputs.push(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;
|
var that = this;
|
||||||
setTimeout(function(){that.element.trigger('resize');}, 100);
|
setTimeout(function(){that.element.trigger('resize');}, 100);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user