Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

A fix for scrolling long option lists #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brandonaaron
Copy link

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
Copy link
Author

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.

@paulstraw
Copy link
Owner

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

@brandonaaron
Copy link
Author

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.

@paulstraw
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants