From f92cf343070bb5260571bfe74f9613af47d14d27 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 4 Oct 2016 14:36:47 -0400 Subject: PLT-3907 Added a javascript library to prevent the from scrolling on iOS (#4147) * Added a javascript library to prevent the from scrolling on iOS * Added iNoBounce to NOTICE.txt --- webapp/components/needs_team.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'webapp/components/needs_team.jsx') 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() { -- cgit v1.2.3-1-g7c22