Deleting a selection should select the next item

VERIFIED FIXED

Status

()

Firefox
Bookmarks & History
VERIFIED FIXED
16 years ago
15 years ago

People

(Reporter: Pierre Chanial, Assigned: Ben Goodger (use ben at mozilla dot org for email))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

16 years ago
 
(Reporter)

Updated

16 years ago
Target Milestone: --- → Phoenix0.3
(Reporter)

Updated

16 years ago
Target Milestone: Phoenix0.3 → ---
(Reporter)

Comment 1

16 years ago
*** Bug 184720 has been marked as a duplicate of this bug. ***
I've been working on a fix for this, and some other selection issues, namely:

- opening 'properties' for a bookmark in the manager loses selection
- inserting an item does not select said item
- etc, for other cases.

I've shuffled the selection memory code in the bookmarks tree a little, and 
will post a patch shortly. 
Created attachment 112669 [details] [diff] [review]
Initial Patch (NOT FINAL!)

This currently handles the removal and no-change cases, still working on the
insertion case, and removing the old transaction-linked selection memory.
Ignore my comment about removing the transaction based methods, I just 
discovered they're necessary for figuring out how many items were inserted by 
an insert operation. 
Created attachment 112670 [details] [diff] [review]
patch #2, works for all three cases, still not done with testing though
Attachment #112669 - Attachment is obsolete: true
Created attachment 112673 [details] [diff] [review]
final patch, I think.
Attachment #112670 - Attachment is obsolete: true

Comment 7

16 years ago
I think I've filed a bug somewhere for one of two of the other issues Ben
addressed. When this gets checked in I'll do a search, and verify they are fixed
dupes.
(Reporter)

Comment 8

16 years ago
Thank you Ben!
In order to reduce the cost of the saveSelection method, _savedSelection could
be a field in the cached _selection (would only be used in trees) and be defined
in getTreeSelection where we already QI the ranges of the selection. This way,
the dnd part would not be modified.

But if you have no time, I'll do it, your patch's already great.
I'm not sure I understand ?
(Reporter)

Comment 10

16 years ago
I was just saying that instead of writing a new function, you could saves the
ranges of the selection in getTreeSelection that already extract them  and then
reuse them when needed. 
But, that's definitely not a problem.
(Reporter)

Comment 11

16 years ago
-> ben
Assignee: chanial → ben
(Reporter)

Comment 12

16 years ago
fixed
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 13

15 years ago
VERIFIED in today's nightly.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.