summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-01 10:29:55 +0100
committerPhil Hughes <me@iamphill.com>2017-08-01 10:29:55 +0100
commitfe555e86fb54a0e21b49020b52a5e7f43beba73c (patch)
tree8217a25e3a2aa1ff8ff1922f1c0e718d8d39e124 /app
parent4bb9a36c97ac925c11c0211e3ef1f8ca1306da32 (diff)
downloadgitlab-ce-fe555e86fb54a0e21b49020b52a5e7f43beba73c.tar.gz
Fixes the search losing focussearch-flickering
This was caused by the blur & then the focus after transition end Closes #35515
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/gl_dropdown.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js
index 3babe273100..9475498e176 100644
--- a/app/assets/javascripts/gl_dropdown.js
+++ b/app/assets/javascripts/gl_dropdown.js
@@ -730,10 +730,10 @@ GitLabDropdown = (function() {
GitLabDropdown.prototype.focusTextInput = function(triggerFocus = false) {
if (this.options.filterable) {
- $(':focus').blur();
-
this.dropdown.one('transitionend', () => {
- this.filterInput.focus();
+ if (this.dropdown.is('.open')) {
+ this.filterInput.focus();
+ }
});
if (triggerFocus) {