From 1c268dfd729a6e271b55e6650fb6f025948dc3db Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 25 Aug 2017 07:42:04 -0700 Subject: [PATCH] PLT-7318 fixing focus issue with IPad (#7287) * PLT-7318 fixing focus issue with IPad * Fixing for RHS --- webapp/components/create_comment/create_comment.jsx | 2 +- webapp/components/create_post.jsx | 2 +- webapp/utils/user_agent.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webapp/components/create_comment/create_comment.jsx b/webapp/components/create_comment/create_comment.jsx index 54f3f65ca3..18648d0e9a 100644 --- a/webapp/components/create_comment/create_comment.jsx +++ b/webapp/components/create_comment/create_comment.jsx @@ -455,7 +455,7 @@ export default class CreateComment extends React.Component { } focusTextbox = (keepFocus = false) => { - if (keepFocus || !Utils.isMobile()) { + if (keepFocus || !UserAgent.isMobile()) { this.refs.textbox.focus(); } } diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx index e7329c5f38..1a7771b9b5 100644 --- a/webapp/components/create_post.jsx +++ b/webapp/components/create_post.jsx @@ -302,7 +302,7 @@ export default class CreatePost extends React.Component { } focusTextbox(keepFocus = false) { - if (keepFocus || !Utils.isMobile()) { + if (keepFocus || !UserAgent.isMobile()) { this.refs.textbox.focus(); } } diff --git a/webapp/utils/user_agent.jsx b/webapp/utils/user_agent.jsx index 1074b02e2a..c16d61d459 100644 --- a/webapp/utils/user_agent.jsx +++ b/webapp/utils/user_agent.jsx @@ -64,7 +64,7 @@ export function isIosWeb() { } export function isIos() { - return userAgent.indexOf('iPhone') !== -1; + return userAgent.indexOf('iPhone') !== -1 || userAgent.indexOf('iPad') !== -1; } export function isAndroid() {