Merge "Fixes for the scroll-up affordance"

This commit is contained in:
jenkins-bot 2013-12-29 15:05:24 +00:00 committed by Gerrit Code Review
commit feedc430d5
2 changed files with 12 additions and 4 deletions

View file

@ -299,6 +299,7 @@ body.mw-mlb-lightbox-open .mlb-main {
.mw-mlb-drag-affordance {
width: 100%;
height: 32px;
cursor: move;
}
.mw-mlb-drag-icon {

View file

@ -469,10 +469,17 @@
};
LIP.toggleMetadata = function () {
var off = this.$controlBar.offset();
$( 'html, body' ).animate( {
scrollTop: off.top - 72
} );
var off = this.$controlBar.offset(),
scroll = this.$main.scrollTop();
if ( scroll > 0 ) {
this.$main.animate( {
scrollTop: 0
}, 400 );
} else {
this.$main.animate( {
scrollTop: off.top - 96
}, 400 );
}
};
mw.LightboxInterface = LightboxInterface;