Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When FORWARDING, %quotePlaceholder% doesn't position forwarded mail text correctly #156

Closed
mbeeby opened this issue Oct 14, 2021 · 3 comments
Assignees
Labels

Comments

@mbeeby
Copy link

mbeeby commented Oct 14, 2021

The following template doesn't work as I understand it should:

<b>This text comes before the quotePlaceholder</b> %quotePlaceholder% %cursor% <b>This text comes after the quotePlaceholder</b>

Result, however, shows quoted text AFTER "This text comes after the quotePlaceholder":

image

@RealRaven2000 RealRaven2000 changed the title %quotePlaceholder% doesn't position quoted text in correct position When FORWARDING, %quotePlaceholder% doesn't position quoted text in correct position Oct 14, 2021
@RealRaven2000 RealRaven2000 self-assigned this Oct 14, 2021
@RealRaven2000
Copy link
Owner

RealRaven2000 commented Oct 14, 2021

I found the cause of the problem - apparently there is no special code of treating the forwarded mail "as a quote". Since there is no <blockquote> element nothing can be found to be moved into the position of the %quotePlaceholder% variable.

Original code from smartTemplate-compose.js:

  let quotePart = bodyEl.querySelector("blockquote[_moz_dirty]");
  if (quotePart) {
    .. process quoted portion...

Patched code:

    let quotePart = (st4composeType=='fwd') ?
	bodyEl.querySelector(".moz-forward-container") :
        bodyEl.querySelector("blockquote[_moz_dirty]");
    if (quotePart) {

Patched version to try out (Thunderbird 78 and later):
smartTemplate-fx-3.8pre169.zip

To try out this version, download the zip file and then drag said zip file into Thunderbird Add-ons Manager (do not unpack files).

@RealRaven2000 RealRaven2000 changed the title When FORWARDING, %quotePlaceholder% doesn't position quoted text in correct position When FORWARDING, %quotePlaceholder% doesn't position forwarded mail text correctly Oct 14, 2021
@RealRaven2000
Copy link
Owner

Backported the bugfix into the legacy version (for Thunderbird 68):

smartTemplate-fx-2.17pre97.zip

To try out this version, download the zip file and then drag said zip file into Thunderbird Add-ons Manager (do not unpack files). Restart Thunderbird as usual.

@RealRaven2000 RealRaven2000 changed the title When FORWARDING, %quotePlaceholder% doesn't position forwarded mail text correctly When FORWARDING, %quotePlaceholder% doesn't position forwarded mail text correctly Oct 18, 2021
@RealRaven2000
Copy link
Owner

Implemented in version 3.8 - please note that for Thunderbird 68 you have to install new versions from the github releases page.

Unfortunately thunderbird.net does not accept updates for legacy versions anymore - they only support the new "Mail extension" format and our "mail extension with experimental APIs" which is a workaround for missing advanced features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants