Web: Common: Added a check condition for Chrome. (iPad)

This commit is contained in:
TatianaLopaeva 2020-12-21 10:44:40 +03:00
parent 32449024b4
commit 0ac797a726

View File

@ -1,7 +1,7 @@
import React from "react";
import styled, { css } from "styled-components";
import { utils } from "asc-web-components";
import { isIOS, isSafari } from "react-device-detect";
import { isIOS, isSafari, isChrome } from "react-device-detect";
const { tablet, size } = utils.device;
const tabletProps = css`
@ -61,7 +61,12 @@ class Section extends React.Component {
componentDidUpdate() {
const { pinned } = this.props;
if (isIOS && isSafari && window.innerWidth <= size.smallTablet && pinned) {
if (
isIOS &&
(isSafari || isChrome) &&
window.innerWidth <= size.smallTablet &&
pinned
) {
this.props.unpinArticle();
}
}