From 7e0374b783f11ec29e4ead4b4f5e839961b45a77 Mon Sep 17 00:00:00 2001 From: KLuka Date: Thu, 5 Mar 2015 17:17:41 +0100 Subject: [PATCH] Issue #180: Ever growing console occurs in iPad Patch taken from comments. More info: https://code.google.com/p/shellinabox/issues/detail?id=180 Refernece: 7ba55246327ad9934ed5d082a12b6cc73f381511 --- shellinabox/vt100.jspp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index fcfb42e..dc97181 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -1171,6 +1171,12 @@ VT100.prototype.resizer = function() { : (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight))-1; + + // Prevent ever growing consoles on iPad. + if (navigator.userAgent.match(/iPad/i) != null) { + height -= 1; + } + var partial = height % this.cursorHeight; this.scrollable.style.height = (height > 0 ? height : 0) + 'px'; this.padding.style.height = (partial > 0 ? partial : 0) + 'px';