Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/68132


Change subject: Update jquery.uls from upstream
......................................................................

Update jquery.uls from upstream

Improve the scroll to viewport feature

Change-Id: Ided6ffdc431ad7278acd501a91cef4a472df1b6f
---
M lib/jquery.uls/src/jquery.uls.core.js
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/32/68132/1

diff --git a/lib/jquery.uls/src/jquery.uls.core.js 
b/lib/jquery.uls/src/jquery.uls.core.js
index 7286a74..0d3cfd0 100644
--- a/lib/jquery.uls/src/jquery.uls.core.js
+++ b/lib/jquery.uls/src/jquery.uls.core.js
@@ -432,15 +432,15 @@
                        var scrollPosition,
                                $window = $( window ),
                                windowHeight = $window.height(),
-                               windowScrollTop = $window.scrollTop(),
-                               windowBottom = windowScrollTop + windowHeight,
+                               windowTop = $window.scrollTop(),
+                               windowBottom = windowTop + windowHeight,
                                $element = $( this ),
                                panelHeight = $element.height(),
                                panelTop = $element.offset().top,
                                panelBottom = panelTop + panelHeight;
 
-                       if ( ( panelTop < windowScrollTop ) || ( panelBottom > 
windowBottom ) ) {
-                               if ( panelHeight > windowHeight ) {
+                       if ( ( panelTop < windowTop ) || ( panelBottom > 
windowBottom ) ) {
+                               if ( windowTop > panelTop ) {
                                        scrollPosition = panelTop;
                                } else {
                                        scrollPosition = panelBottom - 
windowHeight;

-- 
To view, visit https://gerrit.wikimedia.org/r/68132
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ided6ffdc431ad7278acd501a91cef4a472df1b6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to