You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
better native scrollbar width compensation for FF
instead of having to offset the padding of children of the autohiding scrollbar container, which gets fiddly quickly, add a new child to the scrollbar container that gets a negative margin of the scrollbar width when needed (on hover and overflowing when overlay is not supported). This needs an extra DOM element, but as it doesn't do anything weird layout-wise (like set position), it shouldn't affect styling at all. It also makes the auto hide scrollbar workarounds completely transparent to the rest of the code.
This commit is contained in:
@@ -112,7 +112,9 @@ export default class AutoHideScrollbar extends React.Component {
|
||||
ref={this._collectContainerRef}
|
||||
className={["mx_AutoHideScrollbar", this.props.className].join(" ")}
|
||||
>
|
||||
{ this.props.children }
|
||||
<div className="mx_AutoHideScrollbar_offset">
|
||||
{ this.props.children }
|
||||
</div>
|
||||
</div>);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user