Skip to content

Commit c05138a

Browse files
authored
Merge pull request #1956 from jasongrout/fontsize
Make the font size more robust against fickle browser values.
2 parents 6adae92 + d376b35 commit c05138a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

notebook/static/notebook/js/outputarea.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ define([
9898
return false;
9999
}
100100
// line-height from http://stackoverflow.com/questions/1185151
101-
var fontSize = this.element.css('font-size');
102-
var lineHeight = Math.floor(parseInt(fontSize.replace('px','')) * 1.5);
101+
var fontSize = this.element.css('font-size') || '14px';
102+
var lineHeight = Math.floor((parseFloat(fontSize.replace('px','')) || 14) * 1.3);
103103
return (this.element.height() > threshold * lineHeight);
104104
};
105105

@@ -110,10 +110,6 @@ define([
110110
this.prompt_overlay.click(function () { that.toggle_scroll(); });
111111

112112
this.element.resize(function () {
113-
// FIXME: Firefox on Linux misbehaves, so automatic scrolling is disabled
114-
if ( utils.browser[0] === "Firefox" ) {
115-
return;
116-
}
117113
// maybe scroll output,
118114
// if it's grown large enough and hasn't already been scrolled.
119115
if (!that.scrolled && that._should_scroll()) {

0 commit comments

Comments
 (0)