From 3e7a31ac752d1a1e01e2850c04dd2d0e862dd008 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 18 May 2017 19:03:51 +0100 Subject: [PATCH] Revert "fix scroll behaviour on macs with no gemini" This reverts commit 1347d9fa65f878cb65aaf0898536645e4a642429. --- src/components/views/rooms/RoomList.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 9a06fb4efa..760b0543c6 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -321,10 +321,11 @@ module.exports = React.createClass({ var panel = ReactDOM.findDOMNode(this); if (!panel) return null; - // empirically, if we have gm-prevented for some reason, the scroll node - // is still the 3rd child (i.e. the view child). This looks to be due - // to vdh's improved resize updater logic...? - return panel.children[2]; // XXX: Fragile! + if (panel.classList.contains('gm-prevented')) { + return panel; + } else { + return panel.children[2]; // XXX: Fragile! + } }, _whenScrolling: function(e) { @@ -372,7 +373,7 @@ module.exports = React.createClass({ // Use the offset of the top of the scroll area from the window // as this is used to calculate the CSS fixed top position for the stickies var scrollAreaOffset = scrollArea.getBoundingClientRect().top + window.pageYOffset; - // Use the offset of the top of the component from the window + // Use the offset of the top of the componet from the window // as this is used to calculate the CSS fixed top position for the stickies var scrollAreaHeight = ReactDOM.findDOMNode(this).getBoundingClientRect().height;