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

Atto editor - The Right-to-left directionality mechanism doesn't work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.6.4, 3.7
    • Text editor Atto
    • MOODLE_36_STABLE, MOODLE_37_STABLE

      Repro Steps
      1. Login to Moodle as a teacher.
      2. Install a Right-to-left language pack (Hebrew, for example).
      3. Create a new post in the "News Announcements" forum.
      4. Change your keyboard language to Hebrew.
      5. Write a couple of paragraphs.
      6. Select all the text in the editor.
      7. Click on the "Right to left" button.
      8. Click on the "Right align" button.
      9. Notice that for now the directionality of the text is correct - The period is presented at the end of the Hebrew sentence, on the left side of it.
      9. Switch to HTML view

       

      Expected Results
      Each one of the paragraphs elements (<p>) should have a "dir=rtl" attribute.

       

      Actual Results
      The separate paragraphs elements don't have a "dir=rtl" attribute, and the only element that have a "dir=rtl" attribute is the encompassing <p> element that include all the separate paragraphs (<p> elements).

       

      Problem
      In HTML, a <p> element doesn't suppose to handle nested <p> elements in it, and because of that there is no inheritance of attributes. Therefore the directionality attribute of the encompassing <p> element does not follow to the child <p> elements in it, and the paragraphs in the text don't get the expected directionality - right to left.

      BTW, If you'll switch back (from HTML view) to text view, you'll notice that the directionality is now incorrect. Anyway, the real issue here is that when the post is sent to the students via e-mail, the e-mail client (Gmail, most of the time) presents the text with an incorrect directionality. While at least sometimes the text would be displayed "RTL correctly" in Moodle, outside of it (in an e-mail client or any other external program that renders text in a different way than Moodle in an RTL UI mode) it would display incorrectly.

      Also, this is not the only issue with Right-to-left editing in Atto, but maybe investigating and fixing this issue would fix some of the other issues.

            Unassigned Unassigned
            AcquaAlta Acqua Alta
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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