mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 10:08:20 -05:00
FIX: Don't dismiss dropdown when searching within posts context.
This commit is contained in:
parent
685471303a
commit
2958b4b0a1
3 changed files with 13 additions and 13 deletions
|
@ -156,7 +156,8 @@ export default Ember.Component.extend({
|
||||||
_bindEvents() {
|
_bindEvents() {
|
||||||
this.$().on('click.discourse-menu-panel', 'a', e => {
|
this.$().on('click.discourse-menu-panel', 'a', e => {
|
||||||
if (e.metaKey || e.ctrlKey || e.shiftKey) { return; }
|
if (e.metaKey || e.ctrlKey || e.shiftKey) { return; }
|
||||||
if ($(e.target).data('ember-action')) { return; }
|
const $target = $(e.target);
|
||||||
|
if ($target.data('ember-action') || $target.closest('.search-link').length > 0) { return; }
|
||||||
this.hide();
|
this.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
export function isModifierOrMetaKey(event) {
|
|
||||||
return e.metaKey || e.ctrlKey || e.shiftKey;
|
|
||||||
}
|
|
|
@ -1,12 +1,14 @@
|
||||||
{{#each results as |result|}}
|
{{#each results as |result|}}
|
||||||
<a class='search-link' href='{{unbound result.urlWithNumber}}'>
|
<li>
|
||||||
<span class='topic'>
|
<a class='search-link' href='{{unbound result.urlWithNumber}}'>
|
||||||
{{i18n 'search.post_format' post_number=result.post_number username=result.username}}
|
<span class='topic'>
|
||||||
</span>
|
{{i18n 'search.post_format' post_number=result.post_number username=result.username}}
|
||||||
{{#unless site.mobileView}}
|
|
||||||
<span class='blurb'>
|
|
||||||
{{{unbound result.blurb}}}
|
|
||||||
</span>
|
</span>
|
||||||
{{/unless}}
|
{{#unless site.mobileView}}
|
||||||
</a>
|
<span class='blurb'>
|
||||||
|
{{{unbound result.blurb}}}
|
||||||
|
</span>
|
||||||
|
{{/unless}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
Loading…
Reference in a new issue