1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Translate scroll movement if the deltaX is the same as the threshold

Because the threshold is zero and the X movement is zero, we were not translating vertical movement to horizontal scrolling. 

Fixes https://github.com/vector-im/riot-web/issues/9804
This commit is contained in:
Travis Ralston
2019-05-22 10:19:38 -06:00
parent 983214f4bf
commit f7ba8ffbd0

View File

@@ -129,7 +129,7 @@ export default class IndicatorScrollbar extends React.Component {
// the harshness of the scroll behaviour. Should be a value between 0 and 1.
const yRetention = 1.0;
if (Math.abs(e.deltaX) < xyThreshold) {
if (Math.abs(e.deltaX) <= xyThreshold) {
// noinspection JSSuspiciousNameCombination
this._scrollElement.scrollLeft += e.deltaY * yRetention;
}