mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 03:33:45 +00:00
Show correct slider window after refresh when the last revision is selected.
This fixes a bug that would show a slider window where neither of the pointers is visible after selecting the last revision of the current window with the old revision pointer and then refreshing. Change-Id: I15402d8ca7b8c783990a32e2d8426871763e20e1
This commit is contained in:
parent
b0466a9615
commit
49dea1cf68
|
@ -141,7 +141,7 @@
|
||||||
this.$element = $slider;
|
this.$element = $slider;
|
||||||
$container.html( $slider );
|
$container.html( $slider );
|
||||||
|
|
||||||
this.slide( Math.floor( this.pointerTwo.getPosition() / this.slider.getRevisionsPerWindow() ), 0 );
|
this.slide( Math.floor( ( this.pointerTwo.getPosition() - 1 ) / this.slider.getRevisionsPerWindow() ), 0 );
|
||||||
this.diffPage.pushState( mw.config.values.extRevisionSliderOldRev, mw.config.values.extRevisionSliderNewRev, this );
|
this.diffPage.pushState( mw.config.values.extRevisionSliderOldRev, mw.config.values.extRevisionSliderNewRev, this );
|
||||||
this.diffPage.initOnPopState( this );
|
this.diffPage.initOnPopState( this );
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue