This was discovered while testing the changes in
MDL-46497. That patch improves the existing behaviour but there is still one small bug left to squash.
The steps to reproduce the issue are:
- Enable RTL/LTR buttons as described in testing instructions
- Create a new course
- Paste "אני כותב בעברית And also in English וחוזר לכתוב בעברית" into the course summary
- Highlight the text and click the right-to-left button (you have to click show more buttons in atto)
- Toggle atto to raw text mode by clicking the "<>" button
- Toggle back to HTML mode by clicking the "<>" button
- Click the left-to-right button
- Toggle back to raw text mode by clicking "<>"
- You should see a redundant <p> tag was added
- You can keep adding more redundant <p> tags by toggling to raw text mode and back again, then clicking the left-to-right button. Each toggle and button combo will add more tags.
- Note: When reproducing this issue you should only be clicking on the buttons. Don't change the cursor position or highlight the text or anything