From d8edf7d24f74e65d4f8bedb592e0c236d3d623cd Mon Sep 17 00:00:00 2001 From: Austin Robertson Date: Sun, 22 Dec 2013 20:01:02 -0600 Subject: [PATCH] enable iPad fix on iPhone user agent --- src/term.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/term.js b/src/term.js index 3af1a07c..bf57f07d 100644 --- a/src/term.js +++ b/src/term.js @@ -470,7 +470,7 @@ Terminal.prototype.initGlobal = function() { Terminal.bindCopy(document); - if (this.isIpad) { + if (this.isIpad || this.isIphone) { Terminal.fixIpad(document); } @@ -692,6 +692,7 @@ Terminal.prototype.open = function(parent) { if (this.context.navigator && this.context.navigator.userAgent) { this.isMac = !!~this.context.navigator.userAgent.indexOf('Mac'); this.isIpad = !!~this.context.navigator.userAgent.indexOf('iPad'); + this.isIphone = !!~this.context.navigator.userAgent.indexOf('iPhone'); this.isMSIE = !!~this.context.navigator.userAgent.indexOf('MSIE'); } @@ -729,7 +730,7 @@ Terminal.prototype.open = function(parent) { // to focus and paste behavior. on(this.element, 'focus', function() { self.focus(); - if (self.isIpad) { + if (self.isIpad || self.isIphone) { Terminal._textarea.focus(); } });