Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs: [Dropdown] Can't click after adding something to dropdown #591

Closed
WilliamMayor opened this issue Mar 27, 2019 · 2 comments
Closed
Assignees
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@WilliamMayor
Copy link

Bug Report

This feels very weird, not sure if it's something I'm doing, or a bug.

If you have a dropdown on a page with {allowAdditions: true} and you try to add a new thing then you can no longer click on links or submit forms.

I've tried this on FF Developer Edition on macOS and Windows 10, as well as Chrome on macOS.

Steps to reproduce

  1. Go to https://fomantic-ui.com/modules/dropdown.html#tagging-and-user-additions
  2. Click on the "Single" dropdown and type "New" into the search box
  3. Press enter, or click away from the dropdown

Expected result

After typing a new option you can now submit the form you're filling in. Or click a link to navigate away.

Actual result

Clicking on links doesn't result in a page navigation. If you try to submit the form, you can't (including using the keyboard).

I've noticed that the links on the docs page that are anchors to somewhere else on the same page still work. My guess is that they're listening on the click event and then scrolling the page to that element? If that's the case then it feels like there's a click event listener that's attached when you open the dropdown and isn't removed when you try to add a new addition.

Version

2.7.2

@lubber-de lubber-de added the type/bug Any issue which is a bug or PR which fixes a bug label Mar 27, 2019
@lubber-de lubber-de self-assigned this Mar 27, 2019
@lubber-de lubber-de added this to the 2.7.4 milestone Mar 27, 2019
@lubber-de
Copy link
Member

Fixed by #593
See https://jsfiddle.net/zwceqvtm/1/

@lubber-de lubber-de added the lang/javascript Anything involving JavaScript label Mar 28, 2019
@WilliamMayor
Copy link
Author

Wow that was fast! Thanks!

@lubber-de lubber-de modified the milestones: 2.7.4, 2.7.5 Apr 2, 2019
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Apr 2, 2019
exoego pushed a commit to exoego/Fomantic-UI that referenced this issue Apr 30, 2019
…Additions enabled

When a single selection dropdown allowed additions which are not available in the dropdown itself by configuring the dropdown using `allowAdditions:true` and such non-existing value was entered, it was not possible to click anywhere else in the document anymore, because the click-event was swallowed.

Reason for this was that the dropdownmenu was not active but still visible. The empty dropdown was not animated to be hidden anymore and the unbinding of the click event  (which prevented any other click event)  did not take place, keeping all following clicks for the whole document in a trap. 

Closes fomantic#591
@y0hami y0hami closed this as completed in ef3057e May 16, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants