mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
Merge pull request #3629 from tgxworld/ok_lets_fix_open_in_new_tab
FIX: Let users open header links in new tab without dismissing dropdown.
This commit is contained in:
commit
326b2812e4
@ -80,12 +80,8 @@ export default Discourse.View.extend({
|
||||
});
|
||||
|
||||
$dropdown.on('click.d-dropdown', function(e) {
|
||||
if(e.which === 1 &&
|
||||
$(e.target).closest('a').not('.search-link, .filter-type').length > 0) {
|
||||
return hideDropdown();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
if(e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) return true;
|
||||
return $(e.target).closest('a').not('.search-link, .filter-type').length > 0 ? hideDropdown() : true;
|
||||
});
|
||||
|
||||
$html.data('hide-dropdown', hideDropdown);
|
||||
|
Loading…
Reference in New Issue
Block a user