1
0
Fork 0

[FIX]: Scroll To Top and mobile scroll fix

This commit is contained in:
sharpshark28 2017-06-24 14:56:06 -05:00
parent 865e5cf34d
commit 60900b2295
2 changed files with 5 additions and 1 deletions

View file

@ -92,9 +92,13 @@ export default {
return { state }
},
mounted () {
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTop = 0
if (this.state.spells.loaded === false) {
Loading.show()
}
this.state.lastSpell = this.spell.id
},
computed: {

View file

@ -36,7 +36,7 @@ export default {
mounted () {
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTo(0, lastSpellPosition)
scrollingPageElement.scrollTop = lastSpellPosition
},
computed: {
filteredSpells () {