eyalroz / bidimailui

BiDi Mail UI: Thunderbird extension for improved right-to-left language support
https://addons.thunderbird.net/en-US/thunderbird/addon/bidi-mail-ui/
Other
19 stars 2 forks source link

RTL incorrect for H.Line and Numbered list #49

Closed shemeshg closed 3 years ago

shemeshg commented 3 years ago

Seems

<ul>

aren't RTL'ed correctly, it produce something like this

  <body bidimailui-charset-is-forced="true" style="direction: ltr;">
    <p style="direction: rtl;">שלום עולם</p>
    <ul>
      <li>שלום</li>
      <li><br>
      </li>
    </ul>
  </body>

also the

<HR>

break things , but I think it was a bug in the previous release also (because it does not produce P object, it just uses BR for new line,

<!DOCTYPE html><html style="direction: ltr;">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=">
    <style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;">
    <p style="direction: rtl;">שלום עולם</p>
    <blockquote>
      <p style="direction: rtl;"><b>שדג</b> 🙁</p>
      <hr width="100%" size="2">שלום<br>
      <br>
    </blockquote>
  </body>
</html>

For comparison - See how in english it keeps using P correcttly

<!DOCTYPE html><html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=">
  </head>
  <body>
    <p>shalom</p>
    <hr width="100%" size="2">
    <p>this line is nexct</p>
    <p>sadf</p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>

Without the addon. Startting with:

<!DOCTYPE html><html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=">
  </head>
  <body>
    <p>shalom</p>
    <p style="direction: rtl;">שלום</p>
    </p>
  </body>
</html>

Pressing Enter the H.Line Icon actually worked fine and produced working result

<!DOCTYPE html><html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=">
  </head>
  <body>
    <p>shalom</p>
    <p style="direction: rtl;">שלום</p>
    <hr width="100%" size="2">
    <p style="direction: rtl;"><br>
    </p>
  </body>
</html>

Tables actually works with no problem. Beside that it is OK.

eyalroz commented 3 years ago

Are we talking about message composition, or display?

If it's display, would you mind attaching a full message (e.g. .eml in a zip file)?

shemeshg commented 3 years ago

It is a copy in "Composition" mode from the ThunderHTMLedit Addon.

To reproduce the test case:

  1. Press the "RTL" icon
  2. Type "שלום עולם"
  3. Press the H.line Icon.
  4. Switch from "Edit" tab to the "HTML" Tab and analyze result.

The HR causing BR I could not reproduce (Could not make the RTL-Addon create this "quoteblock"...,

but the LI causing BR could be easily reproduce with

  1. Start Numbered table, (in LTR mode)
  2. Set first LI LTR
  3. Second to RTR (This would cause BR and not a new LI)

Screen Shot 2021-08-29 at 0 49 02 Screen Shot 2021-08-29 at 0 50 26 Screen Shot 2021-08-29 at 0 50 54 Screen Shot 2021-08-29 at 0 51 18 Screen Shot 2021-08-29 at 0 53 17

In picture above is the opposite , with RTL list (first item RTL), adding new LTR ListItem

shemeshg commented 3 years ago

Confirm, these fix all these issues.

FYI There are issues with the Core Rendering of thunderbird in RTL mode. but it has nothing to do with this addon. The Addon now works as expected.

Thanks Shemeshg