Fix scroll listener for multi select inputs

This commit is contained in:
advplyr 2022-12-19 16:10:45 -06:00
parent 3d3a224402
commit eb9a077520
3 changed files with 6 additions and 6 deletions

View file

@ -140,7 +140,7 @@ export default {
}, 50)
},
recalcMenuPos() {
if (!this.menu) return
if (!this.menu || !this.$refs.inputWrapper) return
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()
if (boundingBox.y > window.innerHeight - 8) {
// Input is off the page
@ -158,7 +158,7 @@ export default {
this.menu.style.width = boundingBox.width + 'px'
},
unmountMountMenu() {
if (!this.$refs.menu) return
if (!this.$refs.menu || !this.$refs.inputWrapper) return
this.menu = this.$refs.menu
var boundingBox = this.$refs.inputWrapper.getBoundingClientRect()