FancySelect
FancySelect copied to clipboard
A fix for scrolling long option lists
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.
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.
Brandon, thanks for the PR. I'm going to review and (hopefully) merge it as soon as I have time.
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.
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.