diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js
index 5c3067c6eb..1e34e7e2ff 100644
--- a/src/components/structures/ScrollPanel.js
+++ b/src/components/structures/ScrollPanel.js
@@ -166,7 +166,7 @@ export default createReactClass({
this._pendingFillRequests = {b: null, f: null};
if (this.props.resizeNotifier) {
- this.props.resizeNotifier.on("middlePanelResized", this.onResize);
+ this.props.resizeNotifier.on("middlePanelResizedNoisy", this.onResize);
}
this.resetScrollState();
@@ -196,11 +196,12 @@ export default createReactClass({
this.unmounted = true;
if (this.props.resizeNotifier) {
- this.props.resizeNotifier.removeListener("middlePanelResized", this.onResize);
+ this.props.resizeNotifier.removeListener("middlePanelResizedNoisy", this.onResize);
}
},
onScroll: function(ev) {
+ if (this.props.resizeNotifier.isResizing) return; // skip scroll events caused by resizing
debuglog("onScroll", this._getScrollNode().scrollTop);
this._scrollTimeout.restart();
this._saveScrollState();
diff --git a/src/components/structures/UserView.js b/src/components/structures/UserView.js
index 694592af88..8e21771bb9 100644
--- a/src/components/structures/UserView.js
+++ b/src/components/structures/UserView.js
@@ -80,7 +80,9 @@ export default class UserView extends React.Component {
const RightPanel = sdk.getComponent('structures.RightPanel');
const MainSplit = sdk.getComponent('structures.MainSplit');
const panel =
;
- return (
);
+ return (
+
+ );
} else {
return (
);
}
diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js
index 7124d908de..feda2e8db1 100644
--- a/src/components/views/rooms/AppsDrawer.js
+++ b/src/components/views/rooms/AppsDrawer.js
@@ -252,6 +252,7 @@ const PersistentVResizer = ({
maxHeight={maxHeight}
onResizeStart={() => {
if (!resizing) setResizing(true);
+ resizeNotifier.startResizing();
}}
onResize={() => {
resizeNotifier.notifyTimelineHeightChanged();
@@ -259,7 +260,7 @@ const PersistentVResizer = ({
onResizeStop={(e, dir, ref, d) => {
setHeight(height + d.height);
if (resizing) setResizing(false);
- resizeNotifier.notifyTimelineHeightChanged();
+ resizeNotifier.stopResizing();
}}
handleWrapperClass={handleWrapperClass}
handleClasses={{bottom: handleClass}}
diff --git a/src/resizer/resizer.js b/src/resizer/resizer.js
index 2234fc5bdf..1e75bf3bdf 100644
--- a/src/resizer/resizer.js
+++ b/src/resizer/resizer.js
@@ -105,6 +105,9 @@ export default class Resizer {
if (this.classNames.resizing) {
this.container.classList.add(this.classNames.resizing);
}
+ if (this.config.onResizeStart) {
+ this.config.onResizeStart();
+ }
const {sizer, distributor} = this._createSizerAndDistributor(resizeHandle);
distributor.start();
@@ -119,6 +122,9 @@ export default class Resizer {
if (this.classNames.resizing) {
this.container.classList.remove(this.classNames.resizing);
}
+ if (this.config.onResizeStop) {
+ this.config.onResizeStop();
+ }
distributor.finish();
body.removeEventListener("mouseup", finishResize, false);
document.removeEventListener("mouseleave", finishResize, false);
diff --git a/src/utils/ResizeNotifier.js b/src/utils/ResizeNotifier.js
index 5467716576..512946828b 100644
--- a/src/utils/ResizeNotifier.js
+++ b/src/utils/ResizeNotifier.js
@@ -31,6 +31,19 @@ export default class ResizeNotifier extends EventEmitter {
// with default options, will call fn once at first call, and then every x ms
// if there was another call in that timespan
this._throttledMiddlePanel = throttle(() => this.emit("middlePanelResized"), 200);
+ this._isResizing = false;
+ }
+
+ get isResizing() {
+ return this._isResizing;
+ }
+
+ startResizing() {
+ this._isResizing = true;
+ }
+
+ stopResizing() {
+ this._isResizing = false;
}
_noisyMiddlePanel() {