diff options
Diffstat (limited to 'vendor/assets')
-rw-r--r-- | vendor/assets/javascripts/vue-virtual-scroller/src/components/DynamicScroller.vue | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/vendor/assets/javascripts/vue-virtual-scroller/src/components/DynamicScroller.vue b/vendor/assets/javascripts/vue-virtual-scroller/src/components/DynamicScroller.vue index 2d354d605f8..d8f5023555c 100644 --- a/vendor/assets/javascripts/vue-virtual-scroller/src/components/DynamicScroller.vue +++ b/vendor/assets/javascripts/vue-virtual-scroller/src/components/DynamicScroller.vue @@ -45,19 +45,21 @@ export default { provide () { if (typeof ResizeObserver !== 'undefined') { this.$_resizeObserver = new ResizeObserver(entries => { - for (const entry of entries) { - if (entry.target) { - const event = new CustomEvent( - 'resize', - { - detail: { - contentRect: entry.contentRect, + requestAnimationFrame(() => { + for (const entry of entries) { + if (entry.target) { + const event = new CustomEvent( + 'resize', + { + detail: { + contentRect: entry.contentRect, + }, }, - }, - ) - entry.target.dispatchEvent(event) + ) + entry.target.dispatchEvent(event) + } } - } + }); }) } |