vue-virtual-scroller icon indicating copy to clipboard operation
vue-virtual-scroller copied to clipboard

Blur event occurs unexpectedly

Open lig-zawa opened this issue 5 years ago • 4 comments
trafficstars

What I expect

When I press the enter key in a textarea, next textarea is focused without blurring.

Problem

If I press the enter key repeatedly, unexpectedly blur event occurs.

virtual-scroller-enter

Reproduction here. https://codesandbox.io/s/lingering-wind-7csku?file=/pages/index.vue

lig-zawa avatar Sep 18 '20 00:09 lig-zawa

Did you find a solution to this? I'm experiencing the same problem. When list is updated, the focused element looses focus.

karanivincent avatar Dec 23 '20 23:12 karanivincent

@karanivincent

I'm still searching for a solution. But I found where the problem might be related.

https://github.com/Akryum/vue-virtual-scroller/blob/e4b28fa5dc14add1ba45e378d538656cd9de4959/src/components/RecycleScroller.vue#L486

lig-zawa avatar Dec 24 '20 09:12 lig-zawa

I ran into this as well, and I modified the component as follows, seemingly without any bad side effects (although I could be wrong):

mounted() {
  this.$refs.my_dynamic_scroller.$refs.scroller.sortViews = function() { /* NOOP */ };
}

hans-pragt avatar Aug 18 '21 18:08 hans-pragt