diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-27 15:30:57 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-03 17:03:49 +0100 |
commit | 655510ec9a658c28f50ccb0caea394f5db7cae59 (patch) | |
tree | ba7d3c35c5d906ad28f2811cfb501bbc7aa0941e /app/assets | |
parent | 85582b0537c50304f30b71a0de61954b1f6c508a (diff) | |
download | gitlab-ce-655510ec9a658c28f50ccb0caea394f5db7cae59.tar.gz |
fixed haml lint
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/gl_dropdown.js | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/dropdowns.scss | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/gl_dropdown.js b/app/assets/javascripts/gl_dropdown.js index 9475498e176..85d720c3a69 100644 --- a/app/assets/javascripts/gl_dropdown.js +++ b/app/assets/javascripts/gl_dropdown.js @@ -731,9 +731,15 @@ GitLabDropdown = (function() { GitLabDropdown.prototype.focusTextInput = function(triggerFocus = false) { if (this.options.filterable) { this.dropdown.one('transitionend', () => { + const initialScrollTop = $(window).scrollTop(); + if (this.dropdown.is('.open')) { this.filterInput.focus(); } + + if ($(window).scrollTop() < initialScrollTop) { + $(window).scrollTop(initialScrollTop); + } }); if (triggerFocus) { diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 572203bce34..9b8176a4a90 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -574,6 +574,7 @@ .dropdown-input-field, .default-dropdown-input { + display: block; width: 100%; min-height: 30px; padding: 0 7px; |