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

Atto gets confused about what is empty

XMLWordPrintable

    • MOODLE_27_STABLE

      Since today's weekly, the JavaScript validation of required form fields thinks some things in atto are empty, when they are not.

      It seems that a value with HTML like '<p>x</p>' triggers the 'Required' validation warning in Chrome of Firefox for me.

      A value like '<p>x<br></p>' does not.

      It can be hard to reproduce this, because browsers do weird things. FOr example, if Atto contains <p>x</p>, with the cursor after the x, then

      • If you type y, you get <p>xy</p>
      • If you type space, you get <p>x <br></p>

      Also, only some changes trigger an event that udpates whether the 'Required warning' appears or disappars. Anyway, these steps to reproduce work for me in Firefox or Chrome:

      1. Go to the question bank and Create a new Description.
      2. On the form, click in the Question Text box.
      3. Expand the toolbar, and click the <> icon.
      4. 'You must supply a value here.' validation error appears.
      5. Type <p>x</p>.
      6. Click <> again.
      7. Click just after the x, and type a space.
      8. Only now does 'You must supply a value here.' validation error go away.
      9. Delete the space.
      10. Click <> button.
      11. Note that validation message does not appaer yet. Note also that the source is now <p>x<br></p>.
      12. Click on another form field, or press Tab, to move focus.
      13. Delete the <br>.
      14. Click on another form field, or press Tab, to move focus.
      15. Now the validation error appears.

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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