Merge pull request #1606 from coralproject/ios-focus-zoom-issues

Disable autofocus on IOS Safari, prevent zoom on narrow screens
This commit is contained in:
Kiwi
2018-05-11 14:31:21 -03:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
@@ -1,5 +1,12 @@
@custom-media --narrow-viewport (max-width: 420px);
.commentContent {
composes: content from "./CommentContent.css";
/* Prevent zoom on narrow viewports */
@media (--narrow-viewport) {
font-size: 16px;
}
}
.placeholder {
@@ -8,6 +8,7 @@ import RTE from './rte/RTE';
import { Icon } from 'plugin-api/beta/client/components/ui';
import { Bold, Italic, Blockquote } from './rte/features';
import { t } from 'plugin-api/beta/client/services';
import bowser from 'bowser';
class Editor extends React.Component {
ref = null;
@@ -40,7 +41,9 @@ class Editor extends React.Component {
}
});
}
if (this.props.isReply) {
// Skip IOS due to a bug, see https://www.pivotaltracker.com/story/show/157434928
if (this.props.isReply && !bowser.ios) {
this.ref.focus();
}
}