Skip to content

Commit

Permalink
PLT-7318 fixing focus issue with IPad (mattermost#7287)
Browse files Browse the repository at this point in the history
* PLT-7318 fixing focus issue with IPad

* Fixing for RHS
  • Loading branch information
coreyhulen authored and hmhealey committed Aug 25, 2017
1 parent 650d861 commit f657577
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/create_comment/create_comment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/create_post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
2 changes: 1 addition & 1 deletion utils/user_agent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f657577

Please sign in to comment.