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

[Dropdown] Recreating while opening transition leaks intent event handlers #653

Closed
unarist opened this issue Apr 10, 2019 · 1 comment
Closed
Assignees
Labels
lang/javascript Anything involving JavaScript type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@unarist
Copy link

unarist commented Apr 10, 2019

Bug Report

Steps to reproduce

  1. Recreate dropdown by .dropdown() immediately after .dropdown('show')
  2. Click any option (closes dropdown)
  3. Click any <a href="..."> links in the page

Expected result

The browser navigates to URL in the href attribute.

Actual result

Nothing happens.

Looks like test.hide event handler has been added with the namespace used before recreating the instance, so new instance can't remove it. Then <a> stops working because the handler calls preventDefault().

Testcase

https://jsfiddle.net/6suLrem1/1/

Version

2.7.4

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/javascript Anything involving JavaScript labels Apr 10, 2019
@lubber-de
Copy link
Member

It's not related to the test.hide method. The reason the dropdown is still shown is, that it is still animating the "show" event while you immediatly want to re-instantiate the module.
Also fixed by #657
See adjusted fiddle here https://jsfiddle.net/gad2791y/

@lubber-de lubber-de added this to the 2.7.5 milestone Apr 10, 2019
@lubber-de lubber-de self-assigned this Apr 10, 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 11, 2019
exoego pushed a commit to exoego/Fomantic-UI that referenced this issue Apr 30, 2019
@y0hami y0hami closed this as completed in c374bcf 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