enable iPad fix on iPhone user agent
This commit is contained in:
+3
-2
@@ -470,7 +470,7 @@ Terminal.prototype.initGlobal = function() {
|
|||||||
|
|
||||||
Terminal.bindCopy(document);
|
Terminal.bindCopy(document);
|
||||||
|
|
||||||
if (this.isIpad) {
|
if (this.isIpad || this.isIphone) {
|
||||||
Terminal.fixIpad(document);
|
Terminal.fixIpad(document);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,6 +692,7 @@ Terminal.prototype.open = function(parent) {
|
|||||||
if (this.context.navigator && this.context.navigator.userAgent) {
|
if (this.context.navigator && this.context.navigator.userAgent) {
|
||||||
this.isMac = !!~this.context.navigator.userAgent.indexOf('Mac');
|
this.isMac = !!~this.context.navigator.userAgent.indexOf('Mac');
|
||||||
this.isIpad = !!~this.context.navigator.userAgent.indexOf('iPad');
|
this.isIpad = !!~this.context.navigator.userAgent.indexOf('iPad');
|
||||||
|
this.isIphone = !!~this.context.navigator.userAgent.indexOf('iPhone');
|
||||||
this.isMSIE = !!~this.context.navigator.userAgent.indexOf('MSIE');
|
this.isMSIE = !!~this.context.navigator.userAgent.indexOf('MSIE');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -729,7 +730,7 @@ Terminal.prototype.open = function(parent) {
|
|||||||
// to focus and paste behavior.
|
// to focus and paste behavior.
|
||||||
on(this.element, 'focus', function() {
|
on(this.element, 'focus', function() {
|
||||||
self.focus();
|
self.focus();
|
||||||
if (self.isIpad) {
|
if (self.isIpad || self.isIphone) {
|
||||||
Terminal._textarea.focus();
|
Terminal._textarea.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user