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

moodle-core-dialogue overwrites supplied configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.6.1
    • 2.6
    • JavaScript
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-43234-master
    • Hide
      • Try opening a variety of Moodle dialogues, including:
        • backup/restore cancellation confirmation;
        • activity chooser
        • file picker
        • enrol dialogue
        • keyboard move
      • open each, then close it, and open it a few more times.
        • Confirm that it appears the same each time**

      The place I noticed this was the backup/restore cancellation with the location being confused on subsequent loads.

      Show
      Try opening a variety of Moodle dialogues, including: backup/restore cancellation confirmation; activity chooser file picker enrol dialogue keyboard move open each, then close it, and open it a few more times. Confirm that it appears the same each time** The place I noticed this was the backup/restore cancellation with the location being confused on subsequent loads.

      As seen with the backup confirmcancel dialogue. If you first choose to stay, and then re-open it, the dialogue is display off screen.

      This turns out to be because the configuration is passed by reference, and we then modify the values - e.g.:

          config.center =     config.centered && true;
          config.centered =   false;
      

      This means that:

      • the first time that the dialogue is displayed, it will be follow the value of config.centered;
      • then config.centered is set to false;
      • any subsequent time it is called, config.centered is now false, therefore config.center is also false

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Petr Skoda Petr Skoda
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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