mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-09-23 18:38:18 +00:00
Ignore negative page scroll values on iOS
Bug: T323400 Change-Id: Id37f3da183a08f936c6b6d11ed7307bb9d8bd28b
This commit is contained in:
parent
76199b7439
commit
79537c9892
|
@ -98,7 +98,8 @@ function init( $container ) {
|
|||
var $body = $( document.body );
|
||||
// TODO: Use ve.addPassiveEventListener
|
||||
$scrollListener.on( 'scroll', OO.ui.throttle( function () {
|
||||
var scrollTop = $scrollContainer.scrollTop();
|
||||
// Round negative values up to 0 to ignore iOS scroll bouncing (T323400)
|
||||
var scrollTop = Math.max( $scrollContainer.scrollTop(), 0 );
|
||||
var isScrollDown = scrollTop > lastScrollTop;
|
||||
if ( isScrollDown !== wasScrollDown ) {
|
||||
if ( !isScrollDown ) {
|
||||
|
|
Loading…
Reference in a new issue