Closed Bug 393873 Opened 17 years ago Closed 17 years ago

when searching by collection in the bookmark organizer, clearing the search box does not show all items in the collection

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3 beta1

People

(Reporter: moco, Assigned: dietrich)

References

Details

when searching by collection in the bookmark organizer, clearing the search box does not show all items in the collection

steps to reproduce:

1) open the bookmarks manager
2) select a folder x
3) edit | find in folder x
4) type "foo" in the search box
5) hit delete three times in the search box

expected results:  see all the items in folder x
actual results:  see items in folder x that match "f"

I think the problem is here:  http://lxr.mozilla.org/seamonkey/source/browser/components/places/content/places.js#375

368   search: function PSB_search(filterString) {
369     // for non-"bookmarks" collections, 
370     // do not search for "" since it will match all history. Assume if the user
371     // deleted everything that they want to type something else and don't 
372     // update the view.
373     if (PlacesSearchBox.filterCollection != "bookmarks" &&
374         (filterString == "" || this.searchFilter.hasAttribute("empty")))
375       return;

What I think we want to do is fix this code, so that if filterString == "", we call PlacesOrganizer.onPlaceSelected(), like we do when the collection is "bookmarks".

380     switch (PlacesSearchBox.filterCollection) {
381     case "collection":
382       var folderId = PlacesOrganizer._places.selectedNode.itemId;
383       content.applyFilter(filterString, true, [folderId], OptionsFilter);
384       PO.setHeaderText(PO.HEADER_TYPE_SEARCH, filterString);
385       break;
386     case "bookmarks":
387       if (filterString != "")
388         content.applyFilter(filterString, true);
389       else
390         PlacesOrganizer.onPlaceSelected();
391       break;
Flags: blocking-firefox3?
iirc this is fixed in my patch on bug 317847.
Assignee: nobody → dietrich
Depends on: 317847
Target Milestone: --- → Firefox 3 M8
Target Milestone: Firefox 3 M8 → Firefox 3 M9
Flags: blocking-firefox3? → blocking-firefox3+
Depends on: 387744
fixed by bug 387744
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9) Gecko/2008053008 Firefox/3.0

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9) Gecko/2008060309 Firefox/3.0

Works just fine now!
Status: RESOLVED → VERIFIED
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.