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

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
Networking: Cookies
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

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

Tracking

Trunk
mozilla0.9.4
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(2 attachments)

(Reporter)

Description

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 
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
(Assignee)

Comment 1

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

Comment 2

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

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. 
(Assignee)

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.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.4
Adding paul to Cc to do the review instead of vishy. 
(Assignee)

Comment 7

17 years ago
cc'ing matt for review

Comment 8

17 years ago
looks ok, r=pchen

Updated

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.
sr=brendan@mozilla.org either way.

/be
(Assignee)

Comment 10

17 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
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
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.