Fixed: Scrolling in Firefox in small window (requires refresh)
Closes #4403
This commit is contained in:
parent
d02d1bbdfe
commit
e3aa92d09a
|
@ -4,7 +4,7 @@ import React, { Component } from 'react';
|
|||
import { Manager, Popper, Reference } from 'react-popper';
|
||||
import classNames from 'classnames';
|
||||
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
||||
import { isMobile as isMobileUtil } from 'Utilities/mobile';
|
||||
import { isMobile as isMobileUtil } from 'Utilities/browser';
|
||||
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
||||
import { icons, sizes, scrollDirections } from 'Helpers/Props';
|
||||
import Icon from 'Components/Icon';
|
||||
|
|
|
@ -5,7 +5,7 @@ import FocusLock from 'react-focus-lock';
|
|||
import classNames from 'classnames';
|
||||
import elementClass from 'element-class';
|
||||
import getUniqueElememtId from 'Utilities/getUniqueElementId';
|
||||
import { isIOS } from 'Utilities/mobile';
|
||||
import { isIOS } from 'Utilities/browser';
|
||||
import { setScrollLock } from 'Utilities/scrollLock';
|
||||
import * as keyCodes from 'Utilities/Constants/keyCodes';
|
||||
import { sizes } from 'Helpers/Props';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import { isMobile as isMobileUtil } from 'Utilities/mobile';
|
||||
import { isMobile, isFirefox } from 'Utilities/browser';
|
||||
import { isLocked } from 'Utilities/scrollLock';
|
||||
import { scrollDirections } from 'Helpers/Props';
|
||||
import OverlayScroller from 'Components/Scroller/OverlayScroller';
|
||||
|
@ -15,7 +15,8 @@ class PageContentBody extends Component {
|
|||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this._isMobile = isMobileUtil();
|
||||
this._isMobile = isMobile();
|
||||
this._isSmallScreenFirefox = isFirefox && window.innerWidth < 768;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -41,7 +42,9 @@ class PageContentBody extends Component {
|
|||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
const ScrollerComponent = this._isMobile ? Scroller : OverlayScroller;
|
||||
const ScrollerComponent = this._isMobile || this._isSmallScreenFirefox ?
|
||||
Scroller :
|
||||
OverlayScroller;
|
||||
|
||||
return (
|
||||
<ScrollerComponent
|
||||
|
|
|
@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||
import React, { Component } from 'react';
|
||||
import { Manager, Popper, Reference } from 'react-popper';
|
||||
import classNames from 'classnames';
|
||||
import { isMobile as isMobileUtil } from 'Utilities/mobile';
|
||||
import { isMobile as isMobileUtil } from 'Utilities/browser';
|
||||
import { kinds, tooltipPositions } from 'Helpers/Props';
|
||||
import Portal from 'Components/Portal';
|
||||
import dimensions from 'Styles/Variables/dimensions';
|
||||
|
|
|
@ -10,3 +10,7 @@ export function isMobile() {
|
|||
export function isIOS() {
|
||||
return mobileDetect.is('iOS');
|
||||
}
|
||||
|
||||
export function isFirefox() {
|
||||
return window.navigator.userAgent.toLowerCase().indexOf('firefox/') >= 0;
|
||||
}
|
Loading…
Reference in New Issue