diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index 52e5147cb1..ef83fea5b6 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -966,7 +966,8 @@ define([ // Fix the output div's height if the clear_output is waiting for // new output (it is being used in an animation). if (!ignore_clear_queue && this.clear_queued) { - var height = this.element.height(); + // this.element.height() rounds the height, so we get the exact value + var height = this.element[0].getBoundingClientRect().height; this.element.height(height); this.clear_queued = false; }