mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
MobileArticleTarget: Remove broken iOS override for #scrollToHeading
This is no longer necessary and doesn't work after we ditched the iOS scrolling hacks in MobileFrontend. And the default implementation works! Bug: T218429 Change-Id: I5fba78a3877901dac5afda46d3004c07cad383d0
This commit is contained in:
parent
7e3e7e9c5a
commit
a89896a500
|
@ -236,23 +236,6 @@ ve.init.mw.MobileArticleTarget.prototype.goToHeading = function ( headingNode )
|
|||
this.scrollToHeading( headingNode );
|
||||
};
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ve.init.mw.MobileArticleTarget.prototype.scrollToHeading = function ( headingNode ) {
|
||||
var position,
|
||||
target = this;
|
||||
|
||||
setTimeout( function () {
|
||||
if ( ve.init.platform.constructor.static.isIos() ) {
|
||||
position = headingNode.$element.offset().top - target.toolbar.$element.height();
|
||||
target.surface.$element.closest( '.overlay-content' ).scrollTop( position );
|
||||
} else {
|
||||
ve.init.mw.MobileArticleTarget.super.prototype.scrollToHeading.call( target, headingNode );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
/**
|
||||
* Done with the editing toolbar
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue