fix(webreader): always hide scrollbars

closes #640
This commit is contained in:
Gauthier Roebroeck 2021-09-23 15:12:30 +08:00
parent 13760c5ef3
commit 85ddae4f48

View file

@ -420,6 +420,8 @@ export default Vue.extend({
if (screenfull.isEnabled) screenfull.on('change', this.fullscreenChanged)
},
async mounted() {
document.documentElement.classList.add('html-reader')
this.$debug('[mounted]', 'route.query:', this.$route.query)
this.readingDirection = this.$store.state.persistedState.webreader.readingDirection
@ -435,6 +437,8 @@ export default Vue.extend({
this.setup(this.bookId, Number(this.$route.query.page))
},
destroyed() {
document.documentElement.classList.remove('html-reader')
this.$vuetify.rtl = (this.$t('common.locale_rtl') === 'true')
window.removeEventListener('keydown', this.keyPressed)
if (screenfull.isEnabled) {
@ -864,3 +868,11 @@ export default Vue.extend({
width: 100%;
}
</style>
<style>
.html-reader::-webkit-scrollbar {
display: none;
}
.html-reader {
scrollbar-width: none;
}
</style>