summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmood@users.noreply.github.com>2016-08-18 19:09:33 +0500
committerenahum <nahumhbl@gmail.com>2016-08-18 09:09:33 -0500
commite5a3e557376363042bbaf9923fca0d57fb6b8b3a (patch)
tree7d91cab5102d10ece021ef16b91e2491f368c2aa /webapp
parentefb060a336bee414df6d6814369f696721e6437b (diff)
downloadchat-e5a3e557376363042bbaf9923fca0d57fb6b8b3a.tar.gz
chat-e5a3e557376363042bbaf9923fca0d57fb6b8b3a.tar.bz2
chat-e5a3e557376363042bbaf9923fca0d57fb6b8b3a.zip
PLT-3842 - Fixing scrolling issue on account/team settings modal (#3819)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/channel_notifications_modal.jsx4
-rw-r--r--webapp/components/team_general_tab.jsx4
-rw-r--r--webapp/components/team_settings_modal.jsx4
-rw-r--r--webapp/components/user_settings/user_settings_advanced.jsx4
-rw-r--r--webapp/components/user_settings/user_settings_display.jsx4
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx4
6 files changed, 18 insertions, 6 deletions
diff --git a/webapp/components/channel_notifications_modal.jsx b/webapp/components/channel_notifications_modal.jsx
index f18cefa23..35a2e4087 100644
--- a/webapp/components/channel_notifications_modal.jsx
+++ b/webapp/components/channel_notifications_modal.jsx
@@ -34,7 +34,9 @@ export default class ChannelNotificationsModal extends React.Component {
};
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
this.setState({activeSection: section});
}
componentWillReceiveProps(nextProps) {
diff --git a/webapp/components/team_general_tab.jsx b/webapp/components/team_general_tab.jsx
index 7ca8f8fce..4d1860de3 100644
--- a/webapp/components/team_general_tab.jsx
+++ b/webapp/components/team_general_tab.jsx
@@ -81,7 +81,9 @@ class GeneralTab extends React.Component {
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
this.setState(this.setupInitialState(this.props));
this.props.updateSection(section);
}
diff --git a/webapp/components/team_settings_modal.jsx b/webapp/components/team_settings_modal.jsx
index aa7b0831e..bbe426d2e 100644
--- a/webapp/components/team_settings_modal.jsx
+++ b/webapp/components/team_settings_modal.jsx
@@ -58,7 +58,9 @@ class TeamSettingsModal extends React.Component {
}
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
this.setState({activeSection: section});
}
render() {
diff --git a/webapp/components/user_settings/user_settings_advanced.jsx b/webapp/components/user_settings/user_settings_advanced.jsx
index 7d4d0ebc2..c647dd0fd 100644
--- a/webapp/components/user_settings/user_settings_advanced.jsx
+++ b/webapp/components/user_settings/user_settings_advanced.jsx
@@ -126,7 +126,9 @@ export default class AdvancedSettingsDisplay extends React.Component {
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
if (!section) {
this.setState(this.getStateFromStores());
}
diff --git a/webapp/components/user_settings/user_settings_display.jsx b/webapp/components/user_settings/user_settings_display.jsx
index ee360d736..9ffc4f721 100644
--- a/webapp/components/user_settings/user_settings_display.jsx
+++ b/webapp/components/user_settings/user_settings_display.jsx
@@ -126,7 +126,9 @@ export default class UserSettingsDisplay extends React.Component {
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
this.updateState();
this.props.updateSection(section);
}
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index e725060ab..814773344 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -285,7 +285,9 @@ class UserSettingsGeneralTab extends React.Component {
}
updateSection(section) {
- $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ if ($('.section-max').length) {
+ $('.settings-modal .modal-body').scrollTop(0).perfectScrollbar('update');
+ }
const emailChangeInProgress = this.state.emailChangeInProgress;
this.setState(Object.assign({}, this.setupInitialState(this.props), {emailChangeInProgress, clientError: '', serverError: '', emailError: ''}));
this.submitActive = false;