summaryrefslogtreecommitdiffstats
path: root/webapp/components/needs_team.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-10-04 14:36:47 -0400
committerChristopher Speller <crspeller@gmail.com>2016-10-04 14:36:47 -0400
commitf92cf343070bb5260571bfe74f9613af47d14d27 (patch)
tree962975809bf500d76edb43849c9cc98358a932e7 /webapp/components/needs_team.jsx
parent3bac3a006128ebcb4a6ea6dd5e2aa2f8614cb434 (diff)
downloadchat-f92cf343070bb5260571bfe74f9613af47d14d27.tar.gz
chat-f92cf343070bb5260571bfe74f9613af47d14d27.tar.bz2
chat-f92cf343070bb5260571bfe74f9613af47d14d27.zip
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
Diffstat (limited to 'webapp/components/needs_team.jsx')
-rw-r--r--webapp/components/needs_team.jsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx
index 1c7bc307d..f7244018d 100644
--- a/webapp/components/needs_team.jsx
+++ b/webapp/components/needs_team.jsx
@@ -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() {