From 9c163528d977e6c5b979982eca5420dc9b7f6811 Mon Sep 17 00:00:00 2001 From: paris Date: Tue, 25 Mar 2014 22:10:24 +0000 Subject: [PATCH] Replaced offsetWidth with scrollWidth --- src/xterm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index 0926be4a..343edda2 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -2731,7 +2731,7 @@ Terminal.prototype.resize = function(x, y) { Terminal.prototype.fit = function () { var container = this.element.parentElement, subjectRow = this.element.firstElementChild, - rows = parseInt(container.offsetHeight / subjectRow.offsetHeight), + rows = parseInt(container.scrollHeight / subjectRow.offsetHeight), characterWidth, cols; @@ -2739,7 +2739,7 @@ Terminal.prototype.fit = function () { characterWidth = parseInt(subjectRow.offsetWidth / this.cols); subjectRow.style.display = ''; - cols = parseInt(container.offsetWidth / characterWidth); + cols = parseInt(container.scrollWidth / characterWidth); this.resize(cols, rows); }