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

VERIFIED FIXED in mozilla0.9.4



Networking: Cookies
17 years ago
17 years ago


(Reporter: Henrik Gemal, Assigned: Stephen P. Morse)


Windows 2000

Firefox Tracking Flags

(Not tracked)


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


(2 attachments)



17 years ago
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 

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

Comment 1

17 years ago
Created attachment 44408 [details] [diff] [review]
retain selected cookie after sort

Comment 2

17 years ago
Created attachment 44409 [details] [diff] [review]
same as above but with garbage removed from file

Comment 3

17 years ago
vishy, blake, please review

Comment 4

17 years ago
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. 

Comment 5

17 years ago
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.
Target Milestone: --- → mozilla0.9.4
Adding paul to Cc to do the review instead of vishy. 

Comment 7

17 years ago
cc'ing matt for review

Comment 8

17 years ago
looks ok, r=pchen


17 years ago
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. either way.


Comment 10

17 years ago
Fix checked in.
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 11

17 years ago
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
You need to log in before you can comment on or make changes to this bug.