Closed Bug 364984 Opened 18 years ago Closed 17 years ago

messagepane content not cleared when opening saved search folder with no matches

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whimboo, Assigned: bugzilla)

References

Details

(Keywords: regression)

Attachments

(1 file)

version 2 beta 1 (20061201)

If you open a saved search folder where no matches can be found the content of the messagepane is not removed. The one from the last message still appears while the threadpane is cleared correctly. I can only see this for Thunderbird 2 builds. Trunk doesn't seem to be affected.
Seems fine over here on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20061227 Thunderbird/2.0b1 ID:2006122703. 

Both panes are cleared.
This does only work if you have selected the first message within a folder. Select any other message and the message pane won't be cleared. Seen with version 2 beta 1 (20070102)
Don't see it with another message either, sorry. Maybe it's win only.
You have to create a Saved Search for only one folder e.g. the Inbox. Do not search across folders. 
Confirming with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/2007010422 SeaMonkey/1.5a

The problem lies in http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js&rev=1.301&mark=117,120,125-127,#117

In line 120 we try to scroll to a new message. This fails of course for a search with no matches, so the if-clause in line 121 evaluates to true (when mailnews.remember_selected_message is true). The result is, that we reselect the last selected message and show it, instead of keeping the message pane cleared.

The code should probably never go this far, when the saved search has no matches.
It's ok with following build: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b2) Gecko/20060831 Thunderbird/2.0a1 Mnenhy/0.7.4.0 ID:2006122904

The patch from Karsten on bug 363831 has raised this issue.
Depends on: 363831
Keywords: regression
This is the Thunderbird equivalent to the SeaMonkey patch in bug 389118. I can't test it myself, but Henrik said, he would test it.
Assignee: mscott → aqualon
Status: NEW → ASSIGNED
Mmh, this issue doesn't occur on trunk for me. Whether or not I applied the patch there is no difference. Bruno, can you run a test for yourself? David, do we need this patch anyway for improvement?
Tested with TB version 3.0a1pre (2007091403). With mailnews.remember_selected_message set to true I still see that issue.

Steps I used to test:

1. Create saved search for Inbox with subject containing 'bar'
2. Select message with subject 'foo' in Inbox (only message there)
3. Go to the saved search, watch the message pane is cleared but shortly after restored and the 'foo' message is shown again.
Comment on attachment 275751 [details] [diff] [review]
Don't try scrolling to message on virtual folders before search is finished

I'm sorry. I used my Mac OS debug build to test it. But the bug is strangely only happen on Windows XP. Applying the patch works fine. David could you please review it?
Attachment #275751 - Flags: review?(bienvenu)
Comment on attachment 275751 [details] [diff] [review]
Don't try scrolling to message on virtual folders before search is finished

looks ok, thx
Attachment #275751 - Flags: review?(bienvenu) → review+
fix checked in, thx for the patch
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: