Skip to content
Snippets Groups Projects

Fix modal width

6 unresolved threads

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
102 102 }
103 103 adjustedOptions[option] = adjustedValue;
104 104 }
105 if (
106 option === 'width' &&
107 parseInt(optionValue, 10) > $(window).width()
  • utkarsh_33 added 75 commits

    added 75 commits

    Compare with previous version

  • 102 102 }
    103 103 adjustedOptions[option] = adjustedValue;
    104 104 }
    105 if (
    106 option === 'width' &&
    107 parseInt(optionValue, 10) >
    108 $(window).width() - (displace.offsets.left + displace.offsets.right)
    109 ) {
    110 adjustedValue = $(window).width() - 40;
  • utkarsh_33 added 1 commit

    added 1 commit

    • ed38845b - Added offset check as to new width calculation

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    • 615ce268 - Added the code that restores the modal size if we switch back to fullscreen mode

    Compare with previous version

  • utkarsh_33 added 1 commit
  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • 102 102 }
    103 103 adjustedOptions[option] = adjustedValue;
    104 104 }
    105 if (
    106 option === 'width' &&
    107 parseInt(optionValue, 10) > $(window).width()
    108 ) {
    109 if (!event.data.settings.modal) {
    110 adjustedValue =
    111 $(window).width() -
    112 40 -
    113 (displace.offsets.left + displace.offsets.right);
  • 106 option === 'width' &&
    107 parseInt(optionValue, 10) > $(window).width()
    108 ) {
    109 if (!event.data.settings.modal) {
    110 adjustedValue =
    111 $(window).width() -
    112 40 -
    113 (displace.offsets.left + displace.offsets.right);
    114 } else {
    115 adjustedValue = $(window).width() - 40;
    116 }
    117 adjustedOptions[option] = adjustedValue;
    118 }
    119 if (
    120 option === 'width' &&
    121 $(window).width() > parseInt(optionValue, 10)
  • 78 * Tests dialog resizing on window resize.
    79 */
    80 public function testModalWidthResizing() {
    81 $this->drupalGet('entity_test/structure/entity_test/fields');
    82 $page = $this->getSession()->getPage();
    83
    84 $page->pressButton('List additional actions');
    85 $page->findLink('Delete')->click();
    86 $this->assertSession()->assertWaitOnAjaxRequest();
    87
    88 // Resize the window.
    89 $this->getSession()->resizeWindow(785, 805);
    90 $dialog = $page->find('css', '[role="dialog"]');
    91 $dialog_style = $dialog->getAttribute('style');
    92 // Assert that the width has been adjusted on window resize.
    93 $this->assertStringContainsString('width: 745', $dialog_style);
  • 102 102 }
    103 103 adjustedOptions[option] = adjustedValue;
    104 104 }
    105 if (
    106 option === 'width' &&
    107 parseInt(optionValue, 10) > $(window).width()
  • utkarsh_33 added 26 commits

    added 26 commits

    Compare with previous version

  • utkarsh_33 added 1 commit

    added 1 commit

    Compare with previous version

  • utkarsh_33 added 73 commits

    added 73 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading