Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-74214

Calendar modal doesn't show when opened from a modal form

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-74214-311
    • Hide

      Master only

      1. Log in as master
      2. Navigate to Reports > Report builder > Custom reports in site administration
      3. Create a new report
      4. In report editor, press Audience tab
      5. Add All users audience type
      6. Press Schedule tab
      7. Press New schedule
      8. Press the calendar icon for the Starting from field
      9. Confirm the calendar modal shows above the form
      10. Click a different date in the calendar modal
      11. Confirm the Starting from field is updated to selected date
      12. Save the form (fill in all required fields)
      13. From Actions menu select Edit schedule details
      14. Confirm the calendar icon still works

      Regression test (311/master)

      1. Navigate to Dashboard
      2. In Calendar block press New event
      3. Confirm the calendar icon for the Date field works correctly when clicked
        • It shows above the modal
        • Selecting a date updates the form Date field
      4. Navigate to new course creation form
      5. Confirm the calendar icon for the Course start date field works correctly when clicked
        • It shows above the form
        • Selecting a date updates the form Course start date field
      Show
      Master only Log in as master Navigate to Reports > Report builder > Custom reports in site administration Create a new report In report editor, press Audience tab Add All users audience type Press Schedule tab Press New schedule Press the calendar icon for the Starting from field Confirm the calendar modal shows above the form Click a different date in the calendar modal Confirm the Starting from field is updated to selected date Save the form (fill in all required fields) From Actions menu select Edit schedule details Confirm the calendar icon still works Regression test (311/master) Navigate to Dashboard In Calendar block press New event Confirm the calendar icon for the Date field works correctly when clicked It shows above the modal Selecting a date updates the form Date field Navigate to new course creation form Confirm the calendar icon for the Course start date field works correctly when clicked It shows above the form Selecting a date updates the form Course start date field

    Description

      This affects Report builder because we have a modal form (the schedule editing form) that uses a date/time selector element, which itself includes the calendar icon for manually choosing a date instead of using the select elements

      The bug is evident when creating/editing a report schedule, and pressing the calendar icon - nothing appears to happen, but if you examine DOM you'll see that it's present but it's zIndex is too low (1) so is hidden behind the modal form itself

      The problem is that this modals z-index value doesn't take account of elements that are run after initial page load, within the module initPanel method. Really, it needs to calculate this value each time it shows the panel

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Mikel Martín Corrales Mikel Martín Corrales
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Gladys Basiana Gladys Basiana
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Carrillo, Paul Holden
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/May/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h