FIX: Let users open header links in new tab without dismissing dropdown.

This commit is contained in:
Guo Xiang Tan 2015-07-27 19:08:39 +08:00
parent 8998a54ce6
commit 5be258ded4
1 changed files with 2 additions and 6 deletions

View File

@ -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);