Bookform: fix scrollTo on mobile view
regression of previous commit
This commit is contained in:
@@ -12,7 +12,6 @@ import {
|
||||
putEndReadDateUnset,
|
||||
putUnreadBook,
|
||||
} from './api.js'
|
||||
import { useTemplateRef, nextTick } from 'vue'
|
||||
import { useRouter, onBeforeRouteUpdate } from 'vue-router'
|
||||
import { VRating } from 'vuetify/components/VRating'
|
||||
import BookFormIcons from './BookFormIcons.vue'
|
||||
@@ -27,7 +26,6 @@ let data = ref(null)
|
||||
let error = ref(null)
|
||||
getBook(data, error, props.id)
|
||||
const imagePathOrDefault = computed(() => getImagePathOrDefault(data.value.coverPath))
|
||||
const mobiledatesel = useTemplateRef('mobiledates')
|
||||
|
||||
onBeforeRouteUpdate(async (to, from) => {
|
||||
getBook(data, error, to.params.id)
|
||||
@@ -48,8 +46,6 @@ async function onReadIconClick() {
|
||||
data.value.wantread = false
|
||||
data.value.endReadDate = today
|
||||
putEndReadDate(props.id, today)
|
||||
await nextTick()
|
||||
mobiledatesel.value.scrollIntoView()
|
||||
} else {
|
||||
putUnreadBook(props.id)
|
||||
}
|
||||
@@ -64,8 +60,6 @@ async function onStartReadIconClick() {
|
||||
if (!data.value.startReadDate) {
|
||||
data.value.startReadDate = today
|
||||
putStartReadDate(props.id, data.value.startReadDate)
|
||||
await nextTick()
|
||||
mobiledatesel.value.scrollIntoView()
|
||||
} else {
|
||||
data.value.startReadDate = null
|
||||
putStartReadDateUnset(props.id)
|
||||
|
||||
Reference in New Issue
Block a user