From 2c8b1ec8208e2bd7801f855126839d062f515a87 Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Mon, 6 Mar 2017 15:40:12 -0800 Subject: [PATCH] RCFilters UI: Fix scrolling (once again) so it works in Firefox In firefox our scrollable container is html, we need to account for that along with body element. Change-Id: Ida603d419c85a2bf27ce8a5d46da7da3c1dc00ea --- .../ui/mw.rcfilters.ui.FilterWrapperWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js index 886dc43a6c..1b3812c86b 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js @@ -187,7 +187,7 @@ mw.rcfilters.ui.FilterWrapperWidget.prototype.scrollToTop = function ( $element, marginFromTop ) { var container = OO.ui.Element.static.getClosestScrollableContainer( $element[ 0 ], 'y' ), pos = OO.ui.Element.static.getRelativePosition( $element, $( container ) ), - containerScrollTop = $( container ).is( 'body' ) ? 0 : $( container ).scrollTop(); + containerScrollTop = $( container ).is( 'body, html' ) ? 0 : $( container ).scrollTop(); // Scroll to item $( container ).animate( { -- 2.20.1