Last Comment Bug 594090 - Search Messages window/dialog bottom buttons not re-enabled after delete and repeated search
: Search Messages window/dialog bottom buttons not re-enabled after delete and ...
Status: RESOLVED FIXED
: fixed-seamonkey2.0.14
Product: SeaMonkey
Classification: Client Software
Component: MailNews: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: neil@parkwaycc.co.uk
:
Mentors:
: 517046 (view as bug list)
Depends on:
Blocks: 80897
  Show dependency treegraph
 
Reported: 2010-09-07 11:28 PDT by Daniel B.
Modified: 2011-03-13 06:57 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch (668 bytes, patch)
2011-03-02 05:14 PST, neil@parkwaycc.co.uk
mnyromyr: review+
mnyromyr: approval‑seamonkey2.0.14+
Details | Diff | Splinter Review

Description Daniel B. 2010-09-07 11:28:45 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

In the mail Search window, if you perform a second search, sometimes the
buttons at the bottom of the window are not re-enabled when you click
on some message lines.

Reproducible: Sometimes

Steps to Reproduce:
1. In MailNews, invoke Search Messages.
2. Do a search.
3. Click on the Search button to perform a search.
4. Notice that the buttons at the bottom become disabled.
5. Click on a message in the results lists.

Actual Results:  
6. The buttons at the bottom remain disabled, even when the search has
completed and even there is a selection in the results list table.

Expected Results:  
6. The button should become re-enabled when cause there to be a selection
in the list.

When the problem happens, it "sticks" until the Search window is closed
and re-opened.
Comment 1 Bruno 'Aqualon' Escherl 2010-09-09 06:40:54 PDT
Don't see this with a SeaMonkey/2.0.8pre nightly and latest trunk (Linux).

Do you get any warnings/errors in the error console when this happens?
Comment 2 Daniel B. 2010-12-21 08:54:36 PST
(In reply to comment #1)

> Do you get any warnings/errors in the error console when this happens?

No.  

Daniel
Comment 3 Jens Hatlak (:InvisibleSmiley) 2011-03-01 13:07:15 PST
Confirming with trunk and the below STR (adjusting summary):

1. Open the Advanced Search dialog
2. Do a search which results in at least two found entries
3. Select one or more search results, but not all
4. Press Delete (either the key or the button)
5. Repeat the search
6. Select one or more of the results

Expected: Buttons are enabled
Actually: Buttons are disabled (workaround: close and reopen dialog)

You'll also notice that the search results don't properly update when you press Delete (only entries you hover with the mouse are updated, otherwise if you don't move the mouse it looks like the delete didn't succeed if you don't look at the status bar which updates correctly).

It seems like the internal state of the view/listeners is totally broken. With a debugger like Venkman you'll see that before the delete action, nsSearchResultsController.isCommandEnabled (SearchDialog.js) is called when you hit Search or select a search result. After the delete action it's only called when you hit Search, i.e. the buttons probably keep being disabled because the nsSearchResultsController somehow got disconnected from the search results view.

Unfortunately comparing with TB's code doesn't help because it uses their JS folder pane code which we don't have yet. :-(

Karsten, Neil, any idea?
Comment 4 neil@parkwaycc.co.uk 2011-03-02 04:41:36 PST
The db view isn't receiving its OnDeleteCompleted notification.
Comment 5 neil@parkwaycc.co.uk 2011-03-02 05:14:05 PST
Created attachment 516233 [details] [diff] [review]
Proposed patch

This is the advanced search version of bug 171711. Both bugs are regressions from bug 80897 because its patch only touched msgMail3PaneWindow.js.
Comment 6 Jens Hatlak (:InvisibleSmiley) 2011-03-02 09:25:12 PST
(In reply to comment #5)
> Created attachment 516233 [details] [diff] [review]
> Proposed patch

Works beautifully, thanks a ton! I think we should even take this for 2.0.next.

> This is the advanced search version of bug 171711. Both bugs are regressions
> from bug 80897 because its patch only touched msgMail3PaneWindow.js.

Wow, that's old!
Comment 7 Jens Hatlak (:InvisibleSmiley) 2011-03-04 05:55:43 PST
*** Bug 517046 has been marked as a duplicate of this bug. ***
Comment 8 neil@parkwaycc.co.uk 2011-03-09 16:46:27 PST
Pushed changeset a5df7cbbe13f to comm-central.
Comment 9 neil@parkwaycc.co.uk 2011-03-13 06:57:32 PDT
Pushed changeset bef7f141c308 to release/comm-1.9.1

Note You need to log in before you can comment on or make changes to this bug.