FancySelect icon indicating copy to clipboard operation
FancySelect copied to clipboard

A fix for scrolling long option lists

Open brandonaaron opened this issue 11 years ago • 4 comments

I took a quick stab at fixing the scrolling issue on long lists (#9). That is when you go to manually click the scrollbar of the options, the options would actually close. This employs a simple flag when the options are being scrolled and prevents the close event from being trigger when this flag is set.

brandonaaron avatar Oct 18 '13 22:10 brandonaaron

If you click on the actual scroll bar without dragging, then the scroll event doesn't fire. The original timeout was a bit too quick to allow someone to click it and drag though. So I bumped the blur timeout a bit.

brandonaaron avatar Oct 24 '13 20:10 brandonaaron

Brandon, thanks for the PR. I'm going to review and (hopefully) merge it as soon as I have time.

paulstraw avatar Oct 24 '13 20:10 paulstraw

No problem. It isn't a completely ideal solution but I had a client that needed a quick fix. Wish I could devote some more time to it as I think there is still a better solution to be had.

brandonaaron avatar Oct 24 '13 20:10 brandonaaron

I'd agree. I wasn't originally using the blur event, which allowed for dealing with this stuff much easier, but had some cross-browser problems. I'll likely merge this in, then eventually refactor to not use blur. We'll see.

paulstraw avatar Oct 24 '13 20:10 paulstraw