mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
Fix scroll listener for multi select inputs
This commit is contained in:
parent
3d3a224402
commit
eb9a077520
@ -117,7 +117,7 @@ export default {
|
|||||||
}, 50)
|
}, 50)
|
||||||
},
|
},
|
||||||
recalcMenuPos() {
|
recalcMenuPos() {
|
||||||
if (!this.menu) return
|
if (!this.menu || !this.$refs.inputWrapper) return
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
if (boundingBox.y > window.innerHeight - 8) {
|
if (boundingBox.y > window.innerHeight - 8) {
|
||||||
// Input is off the page
|
// Input is off the page
|
||||||
@ -135,7 +135,7 @@ export default {
|
|||||||
this.menu.style.width = boundingBox.width + 'px'
|
this.menu.style.width = boundingBox.width + 'px'
|
||||||
},
|
},
|
||||||
unmountMountMenu() {
|
unmountMountMenu() {
|
||||||
if (!this.$refs.menu) return
|
if (!this.$refs.menu || !this.$refs.inputWrapper) return
|
||||||
this.menu = this.$refs.menu
|
this.menu = this.$refs.menu
|
||||||
|
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
|
@ -68,14 +68,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
recalcMenuPos() {
|
recalcMenuPos() {
|
||||||
if (!this.menu) return
|
if (!this.menu || !this.$refs.inputWrapper) return
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
this.menu.style.top = boundingBox.y + boundingBox.height - 4 + 'px'
|
this.menu.style.top = boundingBox.y + boundingBox.height - 4 + 'px'
|
||||||
this.menu.style.left = boundingBox.x + 'px'
|
this.menu.style.left = boundingBox.x + 'px'
|
||||||
this.menu.style.width = boundingBox.width + 'px'
|
this.menu.style.width = boundingBox.width + 'px'
|
||||||
},
|
},
|
||||||
unmountMountMenu() {
|
unmountMountMenu() {
|
||||||
if (!this.$refs.menu) return
|
if (!this.$refs.menu || !this.$refs.inputWrapper) return
|
||||||
this.menu = this.$refs.menu
|
this.menu = this.$refs.menu
|
||||||
|
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
|||||||
}, 50)
|
}, 50)
|
||||||
},
|
},
|
||||||
recalcMenuPos() {
|
recalcMenuPos() {
|
||||||
if (!this.menu) return
|
if (!this.menu || !this.$refs.inputWrapper) return
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
if (boundingBox.y > window.innerHeight - 8) {
|
if (boundingBox.y > window.innerHeight - 8) {
|
||||||
// Input is off the page
|
// Input is off the page
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
this.menu.style.width = boundingBox.width + 'px'
|
this.menu.style.width = boundingBox.width + 'px'
|
||||||
},
|
},
|
||||||
unmountMountMenu() {
|
unmountMountMenu() {
|
||||||
if (!this.$refs.menu) return
|
if (!this.$refs.menu || !this.$refs.inputWrapper) return
|
||||||
this.menu = this.$refs.menu
|
this.menu = this.$refs.menu
|
||||||
|
|
||||||
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
|
||||||
|
Loading…
Reference in New Issue
Block a user