Disable autofocus on IOS Safari, prevent zoom on narrow screens

This commit is contained in:
Chi Vinh Le
2018-05-11 00:30:12 +02:00
parent 462f5e8206
commit 631206f360
2 changed files with 9 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,7 @@ class Editor extends React.Component {
}
});
}
if (this.props.isReply) {
if (this.props.isReply && !bowser.ios) {
this.ref.focus();
}
}