mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
UX: Dropdown not dismissing until next page renders.
This commit is contained in:
parent
1edb5919fa
commit
7ce77a151c
1 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,7 @@ export default Discourse.View.extend({
|
|||
controller.set('visibleDropdown', null);
|
||||
}
|
||||
$html.off('click.d-dropdown');
|
||||
$dropdown.off('click.d-dropdown');
|
||||
};
|
||||
|
||||
// if a dropdown is active and the user clicks on it, close it
|
||||
|
@ -78,6 +79,10 @@ export default Discourse.View.extend({
|
|||
return $(e.target).closest('.d-dropdown').length > 0 ? true : hideDropdown.apply(self);
|
||||
});
|
||||
|
||||
$dropdown.on('click.d-dropdown', function(e) {
|
||||
return $(e.target).closest('a').not('.search-link').length > 0 ? hideDropdown.apply(self) : true;
|
||||
});
|
||||
|
||||
$html.data('hide-dropdown', hideDropdown);
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue