Merge pull request #3571 from tgxworld/fix_header_not_dismissing_on_click
UX: Dropdown not dismissing until next page renders.
This commit is contained in:
commit
160ee67620
|
@ -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;
|
||||
|
|
|
@ -238,7 +238,10 @@
|
|||
&#site-map-dropdown {
|
||||
.heading {
|
||||
padding: 5px 5px 5px 0;
|
||||
a {padding: 0 5px;}
|
||||
a {
|
||||
display: block;
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue