-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.7.1
-
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:
- Go to the question bank and Create a new Description.
- On the form, click in the Question Text box.
- Expand the toolbar, and click the <> icon.
- 'You must supply a value here.' validation error appears.
- Type <p>x</p>.
- Click <> again.
- Click just after the x, and type a space.
- Only now does 'You must supply a value here.' validation error go away.
- Delete the space.
- Click <> button.
- Note that validation message does not appaer yet. Note also that the source is now <p>x<br></p>.
- Click on another form field, or press Tab, to move focus.
- Delete the <br>.
- Click on another form field, or press Tab, to move focus.
- Now the validation error appears.
- has a non-specific relationship to
-
MDL-48340 Atto triggers required when still in focus
-
- Closed
-