PLT-3907 Added a javascript library to prevent the <body> from scrolling on iOS (#4147)

* Added a javascript library to prevent the <body> from scrolling on iOS

* Added iNoBounce to NOTICE.txt
Этот коммит содержится в:
Harrison Healey
2016-10-04 14:36:47 -04:00
коммит произвёл Christopher Speller
родитель 3bac3a0061
Коммит f92cf34307
3 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

@@ -39,6 +39,9 @@ import InviteMemberModal from 'components/invite_member_modal.jsx';
import LeaveTeamModal from 'components/leave_team_modal.jsx';
import SelectTeamModal from 'components/admin_console/select_team_modal.jsx';
import iNoBounce from 'inobounce';
import * as UserAgent from 'utils/user_agent.jsx';
export default class NeedsTeam extends React.Component {
constructor(params) {
super(params);
@@ -103,6 +106,11 @@ export default class NeedsTeam extends React.Component {
});
Utils.applyTheme(this.state.theme);
if (UserAgent.isIosSafari()) {
// Use iNoBounce to prevent scrolling past the boundaries of the page
iNoBounce.enable();
}
}
componentDidUpdate(prevProps, prevState) {
@@ -116,6 +124,10 @@ export default class NeedsTeam extends React.Component {
PreferenceStore.removeChangeListener(this.onPreferencesChanged);
$(window).off('focus');
$(window).off('blur');
if (UserAgent.isIosSafari()) {
iNoBounce.disable();
}
}
render() {

Просмотреть файл

@@ -12,6 +12,7 @@
"flux": "2.1.1",
"font-awesome": "4.6.3",
"highlight.js": "9.7.0",
"inobounce": "0.1.3",
"intl": "1.2.5",
"jasny-bootstrap": "3.1.3",
"jquery": "3.1.1",