Skip to content

Scrollable suggestion dropdown, clicking the scroll bar causes the suggestions dropdown to collapse #121

@nmoore93

Description

@nmoore93

Hi, thanks very much for the library!

I noticed a small issue when using this library when the suggestions list is given a max height and set to scroll when the number of suggestions would cause the height to go beyond this max height. Clicking the scroll bar would cause the suggestion list to collapse / disappear again as the event prevent default is only on the li elements in Suggestions.js

I have a simple fix ready to create a pull request where I add an event handler for the ul elements onmousedown which prevents the event from bubbling up.

Steps to recreate:

  1. Update the suggestions ul styling to have overflows of scroll
  2. Pass enough suggestions to cause the ul to be scrollable
  3. Try to scroll the suggestions by clicking the scroll bar and dragging, rather than using a mouse wheel for example - the suggestions dropdown will close

Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions