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

Combobox prevents re-selection of the page after pressing the back button

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MDL-83523-main
    • Hide

      Test combobox with redirect (Tertiary Navigation)

      1. Navigate to a Moodle page that uses a combobox, such as the "Grader report" page.
      2. Open the "Grader report" combobox and select "Grade history" from the menu.
      3. Verify that the page redirects correctly to the "Grade history" page.
      4. Press the browser's back button to return to the "Grader report" page.
      5. Attempt ** to re-select "Grade history" from the combobox.
      6. Verify that the page redirects correctly to the "Grade history" page.
      7. Open the "Grade history" combobox and select "Import" from the menu.
      8. Navigate to a Moodle page with one or more combobox such as the "Import" page.
      9. Select "XML file" from the "Import as" combobox.
      10. Verify that the page redirects to the "Import XML" page.
      11. Perform exploratory testing on other pages with tertiary navigation, such as Participants, Grades, Reports, and Course reuse.
      Show
      Test combobox with redirect (Tertiary Navigation) Navigate to a Moodle page that uses a combobox, such as the "Grader report" page. Open the  "Grader report"  combobox and select  "Grade history"  from the menu. Verify that the page redirects correctly to the "Grade history" page. Press the browser's back button to return to the "Grader report" page. Attempt ** to re-select "Grade history" from the combobox. Verify that the page redirects correctly to the "Grade history" page. Open the  "Grade history"  combobox and select  "Import"  from the menu. Navigate to a Moodle page with one or more combobox such as the "Import" page. Select "XML file" from the "Import as" combobox. Verify that the page redirects to the "Import XML" page. Perform exploratory testing on other pages with tertiary navigation, such as Participants, Grades, Reports, and Course reuse.
    • Show
      Fails against automated checks. Checked MDL-83523 using repository: https://github.com/tsmilan/moodle.git main (1 errors / 7 warnings) [branch: MDL-83523-main | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (1/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/7) , gherkin (0/0) , Should these errors be fixed? Built on: Wed 13 Nov 2024 09:05:12 AM UTC
    • Show
      Launching automatic jobs for branch MDL-83523 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17257/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58808/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58809/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58810/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58811/ App tests (stable app version) Built on: Wed Nov 6 08:30:32 AM UTC 2024

      Bug Description

      The problem occurs when using the browser's back button to navigate between pages. After navigating to a different page (page B) using the combobox, pressing the back button and returning to the previous page (page A) prevents the user from re-selecting the same combobox option (page B). The combobox doesn't trigger a page reload because the value of the hidden inputElement is cached and remains the same, which blocks the re-selection of the same page.

      This issue became apparent after working on MDL-82625, where the tertiary menu navigation did not properly reflect the current active page after using the back button in the browser. After fixing the checkmark issue in MDL-82625, this issue with the combobox navigation became more noticeable.

      Steps to replicate

      1. Cherry-pick the code from MDL-82625.
      2. Navigate to a Moodle page that uses a combobox, such as the "Grader report" page.
      3. Select another page from the combobox, e.g., "Grade history"
      4. Verify the page redirects correctly to "Grade history".
      5. Press the browser's back button to return to the "Grader report" page.
      6. Attempt to re-select "Grade history" from the combobox.

      Expected behaviour:

      The user should be able to select the Grade history option again and be redirected back to that page.

      Actual behaviour:

      After pressing the back button, the combobox prevents the user from re-selecting "Grade history" because the inputElement.value and option.dataset.value are identical, which prevents the combobox from triggering a page reload

            trishamilan Trisha Milan
            trishamilan Trisha Milan
            cameron1729 cameron1729
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 minutes
                3m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.