diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-10-24 22:17:03 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-10-24 22:17:03 +0300 |
commit | dfb082434611648658ace012d45b7d6914bc70bd (patch) | |
tree | 42c08de9e6a0420544253383473438fb12b367cc /app/assets/javascripts/issuable/auto_width_dropdown_select.js | |
parent | f8f1466ad07b3dcea7c0abc54fa25865b420b4f0 (diff) |
Prettify all the things (part 7)
Diffstat (limited to 'app/assets/javascripts/issuable/auto_width_dropdown_select.js')
-rw-r--r-- | app/assets/javascripts/issuable/auto_width_dropdown_select.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/issuable/auto_width_dropdown_select.js b/app/assets/javascripts/issuable/auto_width_dropdown_select.js index 07cf1eff279..612c524ca1c 100644 --- a/app/assets/javascripts/issuable/auto_width_dropdown_select.js +++ b/app/assets/javascripts/issuable/auto_width_dropdown_select.js @@ -27,7 +27,10 @@ class AutoWidthDropdownSelect { // We have to look at the parent because // `offsetParent` on a `display: none;` is `null` - const offsetParentWidth = $(this).parent().offsetParent().width(); + const offsetParentWidth = $(this) + .parent() + .offsetParent() + .width(); // Reset any width to let it naturally flow $dropdown.css('width', 'auto'); if ($dropdown.outerWidth(false) > offsetParentWidth) { |