react-tags icon indicating copy to clipboard operation
react-tags copied to clipboard

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

Open nmoore93 opened this issue 7 years ago • 2 comments

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

nmoore93 avatar Mar 27 '18 10:03 nmoore93

Thanks for submitting such a detailed issue and accompanying PR @nmoore93 I'll take a look into it

UPDATE: I'm unable to recreate this issue, clicking and dragging the scroll bar has no effect on the dropdown display in Firefox or Safari. What browser and OS are you using?

i-like-robots avatar Apr 23 '18 20:04 i-like-robots

Having this problem with Chrome in the latest version.

davidb-e4s avatar Jan 19 '22 15:01 davidb-e4s

@i-like-robots Still having the same problem on latest version on chrome. Any other workaround except upgrading the library to the altest beta version?

s-nikhil avatar Nov 17 '22 12:11 s-nikhil

This issue has been resolved in v7+

i-like-robots avatar Oct 23 '23 08:10 i-like-robots