Check if the issue is reproducible with the latest stable version.
3.2.6
in a nav with a dropdown after clicking on a dropdownitem the dropdown does not hide.
It only hides if I do an extraclick outside the dropdown area. This is a problem, because there other click sensitive stuff can be.
As in former versions after clicking the menu item in the dropdown, the dropdown should hide.
in this version it still worked (dropdown disappearead after click): uikit-3.0.0-rc26
A minimal Codepen that can reproduce the bug. Start with this Codepen template
I just realized noticed this behavior as well. The last version I used where the dropdown would hide on click is 3.1.6.
It may have broken in version 3.2.4: "Fix show/hide behaviour in Drop component"
If you want an empty link to "hide" the dropdown, you'll need to give it the uk-navbar-dropdown-close class.
In UIkit 4 we will have to be more concise on what closes/hides things like Modals and Dropdowns.
Yeah. It is quite a bummer that clicking on a link inside a nav dropdown doesn't automatically close the dropdown :(
It's true that I can add the uk-navbar-dropdown-close class to a valid link (in the dropdown). And yeah, clicking on the link will close the dropdown.. but it renders useless the actual purpose of the link (i.e. to send the user to a new part of the application).
Most helpful comment
If you want an empty link to "hide" the dropdown, you'll need to give it the
uk-navbar-dropdown-closeclass.In UIkit 4 we will have to be more concise on what closes/hides things like Modals and Dropdowns.