FIX: Chrome scrolling page up when you expand likes
This commit is contained in:
parent
8baf5bb40d
commit
c3f08145b8
|
@ -25,7 +25,17 @@ export default Ember.Mixin.create({
|
|||
const buffer = [];
|
||||
this.renderString(buffer);
|
||||
|
||||
// Chrome likes scrolling after HTML is set
|
||||
// This happens if you navigate back and forth a few times
|
||||
// Before removing this code confirm that this does not cause scrolling
|
||||
// 1. Sort by views
|
||||
// 2. Go to last post on one of the topics
|
||||
// 3. Hit back
|
||||
// 4. Go to last post on same topic
|
||||
// 5. Expand likes
|
||||
const scrollTop = $(window).scrollTop();
|
||||
$sel.html(buffer.join(''));
|
||||
$(window).scrollTop(scrollTop);
|
||||
},
|
||||
|
||||
rerenderString() {
|
||||
|
|
Loading…
Reference in New Issue