Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Scroll investigation changes #2766

Merged
merged 5 commits into from
Mar 11, 2019
Merged

Scroll investigation changes #2766

merged 5 commits into from
Mar 11, 2019

Conversation

bwindels
Copy link
Contributor

@bwindels bwindels commented Mar 7, 2019

Intermediate result of the scroll jump investigations. I don't expect this to fix the problem at all, but still some changes worthwhile to include:

  • better naming (renamed onWidgetLoad to onHeightChange as it's confusing with the widgets feature of riot)
  • Disable resize observer (this seems to cause more problems than it solves, and is a bit magical anyway. Calling onWidgetLoad onHeightChange where needed seems like a better and more compatible way of preventing jumps).
  • Fixes a slight jump when clicking "Encrypt " in MFileBody

Related to element-hq/element-web#8565

as it's easy to confuse it with room widgets, but has nothing to do with it.
seems to cause more harm than good in some cases and we shouldn't need
it if we get our calls to onHeightChanged in order.
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, these all seem like good changes. 😁

@@ -181,12 +161,6 @@ module.exports = React.createClass({

componentDidMount: function() {
this.checkScroll();

this._timelineSizeObserver = createTimelineResizeDetector(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also remove the matching block in componentWillUnmount as well.

@jryans jryans assigned bwindels and unassigned jryans Mar 8, 2019
@bwindels bwindels merged commit 99f82a3 into develop Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants