Closed Bug 93049 Opened 23 years ago Closed 23 years ago

Sorting by "Site" or "Cookie Name" selects another cookie

Categories

(Core :: Networking: Cookies, defect, P3)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.4

People

(Reporter: bugzilla, Assigned: morse)

Details

(Whiteboard: has patch, r, needs sr.)

Attachments

(2 files)

If you go into your Cookie Manager and select the Stored Cookies.
Now select the first cookie. Now click the "Cookie Name" column to get the 
cookies sorted by cookie name. Now the selected cookie if still the first one 
but the Data in "Information about the selected cookie" doesn't change which is 
wrong.

When you sort using the columns the original selected cookie should be selected 
againg and the display should be scrolled to the position. I know this is a bit 
hard. Perhaps I could live with the "Information about..." just being updated so 
it reflects the actual selected cookie.

Build 20010731
vishy, blake, please review
I filed a bug on retaining selection during column sort awhile ago.  I believe
the correct way to fix this is to fix it on the toolkit end: the currently
selected item should continue to be selected after a sort, and then a select
event should probably fire so, for example, the cookie description information
would get updated. 
But in the iterim we are not doing the sort in the toolkit but rather the cookie 
manager is doing its own sort.  So this patch is necessary as long as we are 
doing it that way.

Probably a similar patch should be made for image manager and password manager, 
since they also do their own sorts (using the same sort routine that cookie 
manager used).  However there its not terrible -- the only problem is that you 
have the wrong item selected after the sort is done.  In this case you have 
something worse -- you are displaying the details of one cookie but showing 
another as the selected cookie.

So the image manager and password manager problem can wait for the toolkit sort 
to be implemented.  This one cannot.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.4
Adding paul to Cc to do the review instead of vishy. 
cc'ing matt for review
looks ok, r=pchen
Priority: -- → P3
Whiteboard: has patch, r, needs sr.
FYI, those id.substring calls can omit the second id.length args, as the default
fencepost is the string length.  The JS will be ever so slightly faster.
sr=brendan@mozilla.org either way.

/be
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified:  Information about original selected cookie retained after sorting.

Win2000 2001-09-24-05-0.9.4
Mac os9 2001-09-24-03-0.9.4
Linux rh6 2001-09-24-04-0.9.4
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: