Closed Bug 497315 Opened 15 years ago Closed 15 years ago

Non-ASCII message loses encoding information after tab switch

Categories

(Thunderbird :: Message Reader UI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rain1, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Bug 474701 comment 103:

"STR:
1. Open a UTF-8 quoted-printable email with non-ASCII characters in the message
pane. (IMAP folder)
2. Middle click on the thread pane message to open it in a tab.
3. Switch back to the 3pane tab.

The UTF-8 characters aren't treated as UTF-8 any more.

There's an "Overwriting an existing document channel!" assertion that happens
there, which I suspect may be the issue."
The problem is that we call makeActive twice, which causes the URL to run through the message pane twice. Commenting out one of the makeActive calls fixes the problem.

asuth's said he's going to make the message display widget's makeActive idempotent.
it turns out the immediate problem is in the gloda-search-layer patch, with the following code sid0 pointed out:

        // try and select it in the folder tree.  if we fail because the
        //  folder is not in the tree, just show it explicitly...
        if (!gFolderTreeView.selectFolder(aTab.folderDisplay.displayedFolder))
          aTab.folderDisplay.show(aTab.folderDisplay.displayedFolder);

For some reason I seemed to believe gFolderTreeView.selectFolder returns a boolean indicating whether it selected anything.  It does not.  That seems like a pretty big oversight, so I expect that was a revert-buffer casualty.

Going to do the MessageDisplayWidget.makeActive thing and also have the unit tests assert if the number of makeActive invocations is not as expected.
Keywords: regression
Flags: blocking-thunderbird3+
I think sid0's patch on bug 467768 should eliminate the double-streaming that still happens.  We ideally would add a unit test to verify we only stream once and a unit test that verifies the ascii wackiness does not happen.
This should be fixed now, though we still want to have unit-tests. Please open a new bug if you still see this.
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.