[FIX]: Scroll To Top and mobile scroll fix
This commit is contained in:
parent
865e5cf34d
commit
60900b2295
2 changed files with 5 additions and 1 deletions
|
@ -92,9 +92,13 @@ export default {
|
||||||
return { state }
|
return { state }
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
|
||||||
|
scrollingPageElement.scrollTop = 0
|
||||||
|
|
||||||
if (this.state.spells.loaded === false) {
|
if (this.state.spells.loaded === false) {
|
||||||
Loading.show()
|
Loading.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.state.lastSpell = this.spell.id
|
this.state.lastSpell = this.spell.id
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default {
|
||||||
mounted () {
|
mounted () {
|
||||||
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
|
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
|
||||||
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
|
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
|
||||||
scrollingPageElement.scrollTo(0, lastSpellPosition)
|
scrollingPageElement.scrollTop = lastSpellPosition
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filteredSpells () {
|
filteredSpells () {
|
||||||
|
|
Loading…
Add table
Reference in a new issue