Skip to content

Commit 26d17b3

Browse files
committed
fix(popup): fix popup not recomputing on internal element scrolls
Adds the recompute listener with capture: true on the scroll so we can catch the non-bubbling scroll events.
1 parent 013704c commit 26d17b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/LibPopup/LibPopup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ const recomputeListener = () => recompute()
333333
334334
const bindListeners = () => {
335335
window.addEventListener("resize", recomputeListener)
336-
window.addEventListener("scroll", recomputeListener)
336+
window.addEventListener("scroll", recomputeListener, true)
337337
}
338338
const unbindListeners = () => {
339339
window.removeEventListener("resize", recomputeListener)
340-
window.removeEventListener("scroll", recomputeListener)
340+
window.removeEventListener("scroll", recomputeListener, true)
341341
}
342342
343343
watch([modelValue, popupEl], () => {

0 commit comments

Comments
 (0)