Hitting enter in numbered list in quoted mail causes numbering to change (mail editing only)
Categories
(Core :: DOM: Editor, defect, P4)
Tracking
()
People
(Reporter: brendan, Unassigned)
References
Details
(Keywords: topembed, Whiteboard: editorbase+)
Attachments
(2 files)
8.07 KB,
patch
|
Brade
:
review+
|
Details | Diff | Splinter Review |
6.40 KB,
text/x-python
|
Details |
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
Comment 4•22 years ago
|
||
Comment 8•22 years ago
|
||
Comment 9•20 years ago
|
||
Comment 10•20 years ago
|
||
Updated•18 years ago
|
Comment 12•5 years ago
|
||
Dear team.
There is a working patch waiting to be pushed into production for 15 (!) that resolves a pretty basic problem in the Editor.
Can someone kindly make an effort to push this into production?
Comment 13•5 years ago
|
||
(In reply to Miguel from comment #12)
Dear team.
There is a working patch waiting to be pushed into production for 15 (!) that resolves a pretty basic problem in the Editor.Can someone kindly make an effort to push this into production?
This is too old, so we cannot apply/approlve this. And I don't know that this still occurs. When I create test case via comment #6 with contenteditable, I cannot reproduce this. Does anyone have test case?
Comment 14•4 years ago
|
||
Hi all
I'm on Thunderbird 78.3.1 (32-bit), on Windows 10 (64-bit), build 19041.508, and this is still happening for me, per comment #6. (Both when relying to emails from others, and an email to self like the example.) Thanks.
Comment 15•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Comment 16•2 years ago
|
||
This is still reproducible. I think that for solving this bug, we need to add some hack around here.
Comment 17•2 years ago
|
||
I can confirm that this bug is still present as of Thunderbird 102.3.3, and it's a super annoying one for people who like and heavily use Thunderbird's nice quoting system for in-line comment responses to emails, in particular with HTML emails.
My suggestion would be to apply some XLST-style filters to HTML text while it is being "quoted" (having the sidebar added). The change should be for all list items <li> within ordered lists <ol> to have the value field set. This way, broken lists would retain their numbering.
<p>Apollo astronauts:</p>
<ol>
<li value=1>Neil Armstrong</li>
<li value=2>Alan Bean</li>
<li value=3>Peter Conrad</li>
</ol>
my comment about that stuff
<ol>
<li value=4>Edgar Mitchell</li>
<li value=5>Alan Shepard</li>
</ol>
Alternatively, since I guess that new </ol> and <ol> tags are being added when a list is broken by message editing within quoted text, the change could be made that time of breaking the list. I am not sure which would be easier from an implementation point of view. In that case, the <ol start=xx> attribute could be used instead:
<ol>
<li>Mix flour, baking powder, sugar, and salt.</li>
<li>In another bowl, mix eggs, milk, and oil.</li>
</ol>
my comment about that
<ol start=3>
<li>Stir both mixtures together.</li>
<li>Fill muffin tray 3/4 full.</li>
<li>Bake for 20 minutes.</li>
</ol>
Comment 18•1 year ago
|
||
Confirming that this bug is still here in Thunderbird 102.13.0 on Ubuntu 20.04.6.
Can we please tag this bug in some way for attention? It's a really bad look and there is a TWENTY YEAR OLD PATCH there which I sure at least contains some useful logic.
I thought I would also note that I found this code fragment, which might lead to some kind of alternative strategy, potentially.
https://codepen.io/NUTTYCHEESECAKEKOALA/pen/BayNpYv
Comment 19•1 year ago
|
||
I made a hacky workaround for this bug, which attempts to transform the HTML of the message to make it robust against Thunderbird poor logic for breaking quoted HTML elements like <ol>. It also attempts to clean up some Word and Outlook derived HTML and quasi-HTML markup.
I haven't figured out how to build Thunderbird, so the patch above isn't something I've been able to look at. Perhaps bits of the above and bits of the earlier patch can be cobbled together by someone who knows more.
Comment 20•1 year ago
|
||
PS that script is limited to Linux at the momen.t It depends on Gtk3 for reading HTML from the clipboard, and the command-line xclip
for writing HTML back to the clipboard. Other code would be needed to support other platforms, including non-Gtk linux versions.
Comment 21•5 months ago
|
||
(In reply to John Pye from comment #18)
I found this code fragment, which might lead to some kind of alternative strategy, potentially.
https://codepen.io/NUTTYCHEESECAKEKOALA/pen/BayNpYv
By "alternative strategy" you mean li::before
? AFAIK this doesn't correctly align single/double digit ordinal numbers (see example in your link), depends on the recipient client's ability to render CSS (which isn't always the case) and probably has other downsides, too.
<ol start="4">
or <li value="4">
(used by your script) is a much simpler solution and also alters the original HTML code less. Win-win, no ?
(In reply to John Pye from comment #19)
Created attachment 9346418 [details]
fixlist.pyI made a hacky workaround for this bug, which attempts to transform the HTML of the message to make it robust against […] breaking quoted HTML elements like <ol>. It also attempts to clean up some Word and Outlook derived HTML and quasi-HTML markup:
- applies <li value=X> attributes to all list items within <ol>, such that, when
editing the email, a broken quoted section will preserve the original list numbering
- reformats <p class="MsoListFormat"> to indented paragraphs with approximately
the correct indenting, minus the heavy Microsoft-specific HTML markup.
- strips out all Microsoft Outlook markup like <o:p> </o:p>
- strips out pointless <span style="mso-fareast-language:EN-US"> markup.
Thank you for your work! Your additional clean-up functions seem very useful.
Description
•