Skip to content

Commit

Permalink
fixes #1101 - Suggestion list position not updated when tagify is in …
Browse files Browse the repository at this point in the history
…a scrollable container (other than `<body>`)
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Aug 19, 2022
1 parent 7ffa196 commit 2380363
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/parts/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,13 @@ export default {
onMouseLeave : _CB.onMouseLeave.bind(this),
onClick : _CB.onClick.bind(this),
onScroll : _CB.onScroll.bind(this),
onContainerScroll : _CB.onContainerScroll.bind(this)
}),
action = bindUnbind ? 'addEventListener' : 'removeEventListener';

if( this.settings.dropdown.position != 'manual' ){
document[action]('scroll', _CBR.position, true)
window[action]('resize', _CBR.position)
window[action]('keydown', _CBR.onKeyDown)
document[action]('scroll', _CBR.onContainerScroll, true)
}

this.DOM.dropdown[action]('mouseover', _CBR.onMouseOver)
Expand Down Expand Up @@ -491,10 +490,6 @@ export default {

this.trigger("dropdown:scroll", {percentage:Math.round(pos)})
},

onContainerScroll(e){
this.dropdown.position()
}
}
},

Expand Down

0 comments on commit 2380363

Please sign in to comment.