update threshold for detecting zoom

This commit is contained in:
Aakansha Doshi 2022-07-06 23:16:08 +05:30
parent c1f972179a
commit b07bdaa46a

View file

@ -922,9 +922,7 @@ class App extends React.Component<AppProps, AppState> {
const scrollBarWidth = 10;
const widthRatio =
(window.outerWidth - scrollBarWidth) / window.innerWidth;
const isBrowserZoomed =
// Device pixel ratio is 2 when zoom is 100%
window.devicePixelRatio !== 2 || widthRatio < 0.9 || widthRatio > 1;
const isBrowserZoomed = widthRatio < 0.75 || widthRatio > 1.1;
if (isBrowserZoomed) {
this.setToastMessage(t("alerts.browserZoom"));
} else {