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

Cannot add and edit source code when using TinyMCE in a modal

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_403_STABLE
    • MDL-80391-403-int
    • MDL-80391-master-int
    • Hide

      Testing instructions for Source Code:

      1. Login as admin and go to Site administration > Plugins > Manage editors.
      2. Make sure "TinyMCE editor" is enabled and at the top of the list.
      3. Now go to Dashboard, enable edit mode and click "Add a block" in the right pane.
      4. Select type "Text...".
      5. In the Content field, click on Tools > Source code. A window manager will open
      6. Try to add

        <h1>Source code</h1>

        .

      7. Verify that you can type the source code then press save
      8. Verify that the source code is appended in the tinymce editor
      9. Click again on Tools > Source code.
      10. Try to edit the source code by adding the following code in the second line

        <p>This is a source code plugin</p>

      11. Verify that you can type the source code then press save
      12. Verify that the source code is appended in the tinymce editor
      13. Click again on Tools > Source code then click "Cancel" button
      14. Verify that you see the block modal
      15. Click again on Tools > Source code then click "Close" button the "X" button on the top right
      16. Verify that you see the block modal

      Testing instructions for Code Sample:

      1. Login as admin and go to Site administration > Plugins > Manage editors.
      2. Make sure "TinyMCE editor" is enabled and at the top of the list.
      3. Now go to Dashboard, enable edit mode and click "Add a block" in the right pane.
      4. Select type "Text...".
      5. In the Content field, click on Insert > Code Sample. A window manager will open
      6. Try to add

        <h1>Code Sample</h1>

        .

      7. Verify that you can type the code sample then press save
      8. Verify that the code sample is appended in the tinymce editor
      9. Click again on Insert > Code Sample.
      10. Try to edit the code sample by adding the following code in the second line

        <p>This is a code sample plugin</p>

      11. Verify that you can type the code sample then press save
      12. Verify that the code sample is appended in the tinymce editor
      13. Click again on Insert > Code Sample then click "Cancel" button
      14. Verify that you see the block modal
      15. Click again on Insert > Code Sample then click "Close" button the "X" button on the top right
      16. Verify that you see the block modal

      You can test in calendar modal as well

      Show
      Testing instructions for Source Code: Login as admin and go to Site administration > Plugins > Manage editors. Make sure "TinyMCE editor" is enabled and at the top of the list. Now go to Dashboard, enable edit mode and click "Add a block" in the right pane. Select type "Text...". In the Content field, click on Tools > Source code. A window manager will open Try to add < h1 >Source code</ h1 > . Verify that you can type the source code then press save Verify that the source code is appended in the tinymce editor Click again on Tools > Source code. Try to edit the source code by adding the following code in the second line < p >This is a source code plugin</ p > Verify that you can type the source code then press save Verify that the source code is appended in the tinymce editor Click again on Tools > Source code then click "Cancel" button Verify that you see the block modal Click again on Tools > Source code then click "Close" button the "X" button on the top right Verify that you see the block modal Testing instructions for Code Sample: Login as admin and go to Site administration > Plugins > Manage editors. Make sure "TinyMCE editor" is enabled and at the top of the list. Now go to Dashboard, enable edit mode and click "Add a block" in the right pane. Select type "Text...". In the Content field, click on Insert > Code Sample. A window manager will open Try to add < h1 >Code Sample</ h1 > . Verify that you can type the code sample then press save Verify that the code sample is appended in the tinymce editor Click again on Insert > Code Sample. Try to edit the code sample by adding the following code in the second line < p >This is a code sample plugin</ p > Verify that you can type the code sample then press save Verify that the code sample is appended in the tinymce editor Click again on Insert > Code Sample then click "Cancel" button Verify that you see the block modal Click again on Insert > Code Sample then click "Close" button the "X" button on the top right Verify that you see the block modal You can test in calendar modal as well
    • 2
    • Team Hedgehog 2024 Sprint 1.1, Team Hedgehog 2024 Sprint 1.2

      How to reproduce:

      1. Login as admin and go to Site administration > Plugins > Manage editors.
      2. Make sure "TinyMCE editor" is enabled and at the top of the list.
      3. Now go to Dashboard, enable edit mode and click "Add a block" in the right pane.
      4. Select type "Text...".
      5. In the Content field, type some text (anything).
      6. In the Content field, click Tools > Source code. A modal will open with the source code.
      7. Try to edit the source code. Right now it's not possible to edit it, and IMO it should be.

      I guess the first modal (the one to create the block) get the focus instead of the source code modal. If I do the same in a forum post for example it works fine because the only modal there is the source code one.

        1. image-2024-02-08-14-10-09-805.png
          76 kB
          Paul Vitagliano
        2. image-2024-02-15-10-03-42-091.png
          77 kB
          Paul Vitagliano
        3. (1) 14 Passed -- (Main)MDL-80391.png
          57 kB
          Kim Jared Lucas
        4. (1) 11-12 Passed -- (Main)MDL-80391.png
          54 kB
          Kim Jared Lucas
        5. (1) 16 Passed -- (Main)MDL-80391.png
          55 kB
          Kim Jared Lucas
        6. (1) 7-8 Passed -- (Main)MDL-80391.png
          64 kB
          Kim Jared Lucas
        7. (2) 11-12 Passed -- (Main)MDL-80391.png
          64 kB
          Kim Jared Lucas
        8. (2) 14 Passed -- (Main)MDL-80391.png
          55 kB
          Kim Jared Lucas
        9. (2) 16 Passed -- (Main)MDL-80391.png
          56 kB
          Kim Jared Lucas
        10. (2) 7-8 Passed -- (Main)MDL-80391.png
          54 kB
          Kim Jared Lucas
        11. (3) Passed -- (Main)MDL-80391.png
          96 kB
          Kim Jared Lucas

            stevani.andolo@moodle.com Stevani Andolo
            dpalou Dani Palou
            Huong Nguyen Huong Nguyen
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours, 29 minutes
                1d 4h 29m

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