summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-09-26 22:02:33 +0000
committerRuben Davila <rdavila84@gmail.com>2016-09-28 13:22:23 -0500
commitd609605e86a9ac3025fa6dfab0c9779b5a5827c5 (patch)
treeb770113d3779c77c073dc82d8758aa25e741e96c /app
parentc91bc7c9f8bafc2ba1a16bb30f5795101ec9d989 (diff)
downloadgitlab-ce-d609605e86a9ac3025fa6dfab0c9779b5a5827c5.tar.gz
Merge branch '22525-emoji-dropdown-shows-search-results-label-several-times' into 'master'
Fixed awards dropdown search text from repeating ## What does this MR do? Thanks @zeiv for this! >This fixes #20463 by adding the .emoji-search class to the "Search results" h5 element. AwardsHandler.prototype.setupSearch() was trying to remove the element before creating a new one, but wasn't because the it was attempting to select it with the .emoji-search class, which wasn't being added. ## Are there points in the code the reviewer needs to double check? >I don't believe so. ## Why was this MR needed? >See #20463 _(and #22525)_ ## Screenshots (if relevant) ![2016-09-23_15.56.04](/uploads/b421400a08b3d9fa32c577e7d8952504/2016-09-23_15.56.04.gif) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #22525 See merge request !6498
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/awards_handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js
index 0decc6d09e6..44af1c135a0 100644
--- a/app/assets/javascripts/awards_handler.js
+++ b/app/assets/javascripts/awards_handler.js
@@ -357,7 +357,7 @@
$('ul.emoji-menu-search, h5.emoji-search').remove();
if (term) {
// Generate a search result block
- h5 = $('<h5>').text('Search results');
+ h5 = $('<h5 class="emoji-search" />').text('Search results');
found_emojis = _this.searchEmojis(term).show();
ul = $('<ul>').addClass('emoji-menu-list emoji-menu-search').append(found_emojis);
$('.emoji-menu-content ul, .emoji-menu-content h5').hide();