Skip to content
Snippets Groups Projects

Resolve "Manual actions dropdown on Pipelines makes to show a vertical scrollbar"

3 unresolved threads

What does this MR do?

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #20052 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
69 69 new IssuableForm($('.merge-request-form'));
70 70 new IssuableTemplateSelectors();
71 71 break;
72 case 'projects:pipelines:index':
  • Victor Wu
  • Victor Wu
    Victor Wu @victorwu started a thread on commit 7c308aad
  • 1 ((global) => {
    2 class GLOverflowDropdown {
    3 constructor($table, $dropdown) {
    4 const MENU_MAX_HEIGHT = 250;
    5
    6 this.$table = $table;
    7 this.$dropdownToggle = $('.dropdown-toggle', $dropdown);
    8 this.$dropdownMenu = $('.dropdown-menu', $dropdown);
    9 this.positioned = false;
    10
    11 this.$dropdownMenu.css({
    12 'max-height': MENU_MAX_HEIGHT,
    13 overflow: 'scroll'
    14 });
    15
    16 $dropdown.off('click.positionDropdownWithinTable')
  • Victor Wu
    Victor Wu @victorwu started a thread on commit ab81d673
  • 291 291 })();
    292 292
    293 293 }).call(this);
    294
  • Victor Wu
  • 17 .on('click.positionDropdownWithinTable', this.positionDropdownWithinTable.bind(this));
    18 }
    19
    20 positionDropdownWithinTable() {
    21 if (this.positioned) return;
    22 const dropdownMenuHeight = this.$dropdownMenu.outerHeight(true);
    23 if ((this.$dropdownToggle.offset().top - this.$table.offset().top + this.$dropdownToggle.outerHeight() + dropdownMenuHeight) > this.$table.outerHeight()) {
    24 this.$dropdownMenu.css({ top: -(dropdownMenuHeight + 3) });
    25 }
    26 this.positioned = true;
    27 }
    28 }
    29
    30 global.GLOverflowDropdown = GLOverflowDropdown;
    31
    32 $.fn.glOverflowDropdown = function($dropdowns) {
    • Author Reporter
      Suggested change
      29
      30 global.GLOverflowDropdown = GLOverflowDropdown;
      31
      32 $.fn.glOverflowDropdown = function($dropdowns) {
      33 const $table = this;
      34 $dropdowns = $dropdowns || $('.gl-overflow-dropdown', $table);
      35 $dropdowns.each(function() {
      36 if (!$.data(this, 'glOverflowDropdown')) {
      29 $.fn.glOverflowDropdown = func($dropdowns) {
      30 console.log('hello world');
      31 });
    • Please register or sign in to reply
    Please register or sign in to reply
    Loading