Bug 1663427 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Alex ARNAUD from comment #0)
> Steps to reproduce:
> 1) Open a mail with at least one PDF in attachment
> 2) Try to right click on the PDF and click on open

Hi Alex ARNAUD, two important info missing from your steps:
- set preference ` Open messages in: A new message window`
- try to open attachment from message displayed in a standalone window

> Result:
> Nothing is happening.

Confirmed. Console error (see below).
 
> Important note:
> After a bit of investigation I found it is specific to PDF and because now the default preference for PDF files is "previous in Thunderbird" (translated from French).

"Preview in Thunderbird" is the new default yes. As a workaround for this bug, you could change that to another default action.

(In reply to clochrua from comment #5)
Thanks clochrua. You are mostly right. Try to use some markdown formatting and blank lines in your comments to make them more readable.

> If I "Open" a pdf attachment in a message displayed in a new window, nothing happens. I presume in this situation "pdf.js" does not have the correct environment required to run.

Correct. Console error:

```
Uncaught (in promise) TypeError: can't access property "openTab", document.getElementById(...) is null
    open chrome://messenger/content/msgHdrView.js:2062
    actionFunction chrome://messenger/content/msgHdrView.js:3337
    HandleMultipleAttachments chrome://messenger/content/msgHdrView.js:3347
    HandleSelectedAttachments chrome://messenger/content/msgHdrView.js:3245
    attachmentItemCommand chrome://messenger/content/msgHdrView.js:2453
    insertItemAt chrome://messenger/content/mailWidgets.js:1566
msgHdrView.js:2062:20
```

          document.getElementById("tabmail").openTab("contentTab", {
            contentPage: this.url,
            background: false,
          });

 
> My first instinct is to suggest that messages be either previewed or displayed in tabs, write message included, but that is a fundamental change I believe.

We're not yet there (compose-in-a-tab, bug 449299), and it wouldn't help for this bug.

> The other solution,perhaps, is to have two preferences, one for "message in tab" and one for "message in window". 

Nah, 2 prefs is too much, but we can try a separate intelligent default. I'll ask Alex ARNAUD in a separate comment what is best from his POV.
 
> But from what I can see currently, it is not possible to set "preferences" to "Preview in Thunderbird" and display pdf attachments in either tabbed or windowed messages.  That looks like a bug as it means you have to switch windows (back to the preview tab) in order to display a pdf.

It's a bug for users of that preference, now confirmed :-)
(In reply to Alex ARNAUD from comment #0)
> Steps to reproduce:
> 1) Open a mail with at least one PDF in attachment
> 2) Try to right click on the PDF and click on open

Hi Alex ARNAUD, two important infos missing from your steps:
- set preference ` Open messages in: A new message window`
- try to open PDF attachment from message displayed in a standalone window

> Result:
> Nothing is happening.

Confirmed. Console error (see below).
 
> Important note:
> After a bit of investigation I found it is specific to PDF and because now the default preference for PDF files is "previous in Thunderbird" (translated from French).

"Preview in Thunderbird" is the new default yes. As a workaround for this bug, you could change that to another default action.

(In reply to clochrua from comment #5)
Thanks clochrua. You are mostly right. Try to use some markdown formatting and blank lines in your comments to make them more readable.

> If I "Open" a pdf attachment in a message displayed in a new window, nothing happens. I presume in this situation "pdf.js" does not have the correct environment required to run.

Correct. Console error:

```
Uncaught (in promise) TypeError: can't access property "openTab", document.getElementById(...) is null
    open chrome://messenger/content/msgHdrView.js:2062
    actionFunction chrome://messenger/content/msgHdrView.js:3337
    HandleMultipleAttachments chrome://messenger/content/msgHdrView.js:3347
    HandleSelectedAttachments chrome://messenger/content/msgHdrView.js:3245
    attachmentItemCommand chrome://messenger/content/msgHdrView.js:2453
    insertItemAt chrome://messenger/content/mailWidgets.js:1566
msgHdrView.js:2062:20
```

          document.getElementById("tabmail").openTab("contentTab", {
            contentPage: this.url,
            background: false,
          });

 
> My first instinct is to suggest that messages be either previewed or displayed in tabs, write message included, but that is a fundamental change I believe.

We're not yet there (compose-in-a-tab, bug 449299), and it wouldn't help for this bug.

> The other solution,perhaps, is to have two preferences, one for "message in tab" and one for "message in window". 

Nah, 2 prefs is too much, but we can try a separate intelligent default. I'll ask Alex ARNAUD in a separate comment what is best from his POV.
 
> But from what I can see currently, it is not possible to set "preferences" to "Preview in Thunderbird" and display pdf attachments in either tabbed or windowed messages.  That looks like a bug as it means you have to switch windows (back to the preview tab) in order to display a pdf.

It's a bug for users of that preference, now confirmed :-)

Back to Bug 1663427 Comment 7