printing-tools-ng icon indicating copy to clipboard operation
printing-tools-ng copied to clipboard

Missing focus event prevents doc restoration like added name title

Open kiki-ja opened this issue 9 months ago • 16 comments

@cleidigh

*3.1.1 *Thunderbird 136

PrintingTools NG 3.1.1-b5 Thunderbird 136.0.1 64bit Windows 10 Pro 22H2 64bit

The text to be displayed in print and print preview also appears in the message pane. This does not occur in Thunderbird 128.8.1esr. Is this a specification change?

Here is the procedure:

  1. Set the string to be displayed in “Add before headers:” in PTNG Option.  eg.Thunderbird 136.0.1 + PrintingTools NG 3.1.1-b5 Image

  2. Select the message you want to print and display it in the message pane. Image

  3. Display the print preview in PTNG. Then cancel. Image

  4. When you return to the message pane, the set text that was not there before the print preview is newly displayed. Image

@kiki-ja

kiki-ja avatar Mar 20 '25 11:03 kiki-ja

@kiki-ja i do not have the mentioned issue.

@cleidigh, b5 works on my pc fine.

tidebre67 avatar Mar 20 '25 14:03 tidebre67

@kiki-ja pls see here correct.

Image

tidebre67 avatar Mar 20 '25 14:03 tidebre67

@kiki-ja @tidebre67 So far I could not reproduce this. @kiki-ja any other settings we could be missing? @cleidigh

cleidigh avatar Mar 20 '25 18:03 cleidigh

@kiki-ja @tidebre67 There is a removal of that element in the restoration code. Maybe check the console if there was an exception preventing it's execution. @cleidigh

cleidigh avatar Mar 20 '25 22:03 cleidigh

@kiki-ja @tidebre67 ok I reproduced it. I can't with the message pane. I opened the msg in a separate tab. Then I get the hdr after closing preview. @cleidigh

cleidigh avatar Mar 20 '25 23:03 cleidigh

@tidebre67

Thank you for your report.

I see that “Thomas Tiedemann” is an additional string that you have set up. It appears correctly in the print preview, but not in the message pane?

Thanks.

@kiki-ja

kiki-ja avatar Mar 22 '25 09:03 kiki-ja

@cleidigh

any other settings we could be missing?

I do not believe there are any settings I am missing. I am attaching my configuration information just in case.

user_pref-PTNG311.txt

There is a removal of that element in the restoration code. Maybe check the console if there was an exception preventing it's execution.

The error console did not record anything.

I can't with the message pane. I opened the msg in a separate tab.

It seems to be different from my case. It does not reproduce when I open a message in a new tab or a new window. It reproduces in the normal message pane and in conversation.

 Image

Then I get the hdr after closing preview.

That is the same as my case.

I installed only PTNG 3.1.1-b5 with a new profile to check for possible conflicts with other add-ons and it reproduced. Selecting the original message after selecting another message solves the problem.

It does not appear in the printed result, so there is no problem. It may be a problem with my environmental conditions.

@kiki-ja

kiki-ja avatar Mar 22 '25 09:03 kiki-ja

@kiki-ja,

investigated again. Strange, never in print view, BUT now the strange thing: when opening a message all looks correct, but i open in the message the print view suddenly the addiional string appears. pls see the following: first: Image second: Image

@cleidigh : Christopher, any idea ?

tidebre67 avatar Mar 22 '25 13:03 tidebre67

@kiki-ja @tidebre67 I was working on this all day yesterday. it's a bigger issue than the name. Don't know if you recall, but we have to restore the document from all the changes when the preview is closed.

We do this by detecting focus on the mail window. I don't get the focus event always, it's intermittent. This is why we all don't see it.

I'm annoyed it's not reliable in v136 I'm trying a new way today.

I also have a German user who is seeing a couple things including incorrect indentation. See the conversation in the download issue. @tidebre67 have you seen that?

@cleidigh

cleidigh avatar Mar 22 '25 14:03 cleidigh

@cleidigh re: indentation. yes, i did, but i do not have this issue. Pls see here:

Image

tidebre67 avatar Mar 22 '25 15:03 tidebre67

@kiki-ja @tidebre67 I changed the title to reflect my findings. Since the focus event was missing sometimes, everything was left unrestored. I changed to using an observer on the preview window and detecting its close.

For b6 I also added two new advanced options. addMessageIdToHdr This appends the id to the bottom of the headers. Several users asked, this is the easy way for now.

@tidebre67 also asked about controlling the hdr column width which several others have asked for in the past. The way I do it now is lousy. Use the following format: hdrColWidth:160 For 160px

Last I fixed &MD if in hdrLeft

cheers @cleidigh

cleidigh avatar Mar 23 '25 00:03 cleidigh

@cleidigh looks great, do not see any problem.

Image

@kiki-ja do you see any issue ?

@tidebre67

tidebre67 avatar Mar 23 '25 12:03 tidebre67

@tidebre67 Does the new column width option do what you need? @cleidigh

cleidigh avatar Mar 23 '25 19:03 cleidigh

@cleidigh yes, excellent , perfect. thanks very much.

@tidebre67

tidebre67 avatar Mar 23 '25 20:03 tidebre67

@cleidigh

I changed the title to reflect my findings.

Thank you for your time.

Since the focus event was missing sometimes, everything was left unrestored. I changed to using an observer on the preview window and detecting its close.

The problem is not reproduced in 3.1.1-b7 and has been resolved. Another issue where repeated clicks on the PTNG icon and PTNG icon pull-down menu would occasionally cause Print Preview to stop working has also been resolved (and was planned to be reported as an Issue). Thank you very much.

@tidebre67

do you see any issue ?

This problem that was occurring in my environment has been resolved. Thanks.

@kiki-ja

kiki-ja avatar Mar 24 '25 11:03 kiki-ja

@kiki-ja @tidebre67 Excellent. You guys see what I see. Actually I think the observer approach is much better. @cleidigh

cleidigh avatar Mar 24 '25 20:03 cleidigh