Closed Bug 27417 Opened 25 years ago Closed 3 years ago

When tree item deleted, next item should be selected (selection should not be destroyed)

Categories

(Core :: XUL, defect, P3)

x86
Windows 98
defect

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: mpt, Unassigned)

References

Details

(Whiteboard: ue1 [need info])

Attachments

(1 file)

Build: 2000021014 To reproduce: * Start Mozilla. Browse with cookies enabled, until you have collected two or more cookies. * Open the Cookie Manager window. * Select the first cookie in the list, and click Remove Cookie. What should happen: * The cookie is deleted, and the next cookie in the list becomes selected. What actually happens: * The cookie is deleted, but the next cookie is not selected. This makes deleting multiple cookies rather tedious. Ben, giving this to you because you'll know if this problem is specific to the cookie manager, or to the widget itself; if it's a problem with the widget, you can give it to XP Toolkit/Widgets.
*** Bug 29034 has been marked as a duplicate of this bug. ***
need to create some JS extensions to the tree widget API to support nifty little things like this everywhere... M16 so I can do this the Right Way.
Status: NEW → ASSIGNED
Target Milestone: M16
not a priority, pushing out as far as possible.
Target Milestone: M16 → M20
changing qa contact to jrgm@netscape.com on some random bugs
QA Contact: paulmac → jrgm
Move to M21 target milestone.
Target Milestone: M20 → M21
Summary: When listbox item deleted, next item should be selected → When tree item deleted, next item should be selected (selection should not be destroyed)
setting component to trees and cc'ing hyatt.
Component: XP Apps → XP Toolkit/Widgets: Trees
This bug makes selectively deleting cookies O(n^2) for keyboard people, adding access keyword and nominating for nsbeta1.
Keywords: access, nsbeta1
nav triage team: Reassigning to hyatt. Seems like something we would like to fix.
Assignee: ben → hyatt
Status: ASSIGNED → NEW
This is supposed to work. bryner and I wrote code to auto-select the next item. Can someone point me to a specific tree that exhibits this problem?
Status: NEW → ASSIGNED
hyatt: all of them, I think (if not, and it is indeed a base behavior of trees now, we should fix some places where we're still manually selecting and focusing). The tree in the cookie manager is one example.
Forget the cookie manager. Here's a simplified example of a tree that demonstrates the problem. Select an item and press the "remove button". Selected item gets deleted. But no automatic reselection occurs. <?xml version="1.0"?> <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> <?xul-overlay href="chrome://global/content/dialogOverlay.xul"?> <!DOCTYPE window> <window id="cookieviewer" class="dialog" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" orient="vertical"> <script type="application/x-javascript"> <![CDATA[ function remove() { var children = document.getElementById("kids"); var mytree = document.getElementById("mytree"); var selitems = mytree.selectedItems; for(i = 0; i < selitems.length; i++) { document.getElementById("kids").removeChild(selitems[i]); } } ]]> </script> <tree id="mytree" class="inset" multiple="true" flex="1"> <treecolgroup> <treecol flex="1"/> </treecolgroup> <treechildren id="kids" flex="1"> <treeitem> <treerow> <treecell class="propertylist" label="first"/> </treerow> </treeitem> <treeitem> <treerow> <treecell class="propertylist" label="second"/> </treerow> </treeitem> <treeitem> <treerow> <treecell class="propertylist" label="third"/> </treerow> </treeitem> </treechildren> </tree> <button label="remove" onclick="remove()"/> </window>
Have a specific patch which at least fixes this for cookies manager and password manager. A more general solution will have to await whatever fix hyatt has planned. It's a good thing I did this because I uncovered several minor problems in the password-manager code which my patch corrects.
It should be noted that most of the changes in this patch are either cleanup or outright bug fixes. Only the few lines that are of the form "x.selectedIndex=" are relevant to auto-selecting after a deletion. So even if the general solution is ever checked in, most of this patch will still be worthwhile.
cc'ing alecf for super-review
r=dbragg
now I'm really cc'ing alecf for super-review (I thought I did it yesterday but apparently I didn't).
sr=alecf
My patch is now checked in. Leaving this open for hyatt to implement the general solution (my patch fixed it for cookies and passwords only).
Target Milestone: --- → Future
Not an access bug, the delete key works for deleting several items at once.
Keywords: access
I marked this bug with the access keyword because it made it difficult to delete *every other* cookie (or otherwise selectively delete cookies).
I don't understand Ruderman's comment. This bug has been fixed for the cookie manager (as well as the password manager). See my pathch of 4/15 which has been checked in.
>This bug has been fixed for the cookie manager (as well as the password manager). That's why I used the past tense in my last comment :)
*** Bug 89789 has been marked as a duplicate of this bug. ***
Blocks: 104166
*** Bug 105639 has been marked as a duplicate of this bug. ***
tree is no more, wontfix
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Outliner is now called tree. Reopening.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
*** Bug 135104 has been marked as a duplicate of this bug. ***
*** Bug 117267 has been marked as a duplicate of this bug. ***
Blocks: 58713
*** Bug 58713 has been marked as a duplicate of this bug. ***
Blocks: 117267
Keywords: nsbeta1
Whiteboard: ue1
->component owner
Assignee: hyatt → hewitt
Status: REOPENED → NEW
QA Contact: jrgm → shrir
Would really like to see this fixed for Buffy since its a big usability issue for Mail. Double click a mail message to open it, click delete on the open msg toolbar. The next msg appears, but if you look at the main mail window, the msg being displayed in the open window isn't selected. Click delete on open msg toolbar. It doesn't work.
Bumping severity to major, since that's major loss of function in the message window.
Severity: normal → major
Problem described in comment #32 is filed as bug 171711 (Delete in standalone window only works once). It may or may not be connected to this bug.
Bug 171711 was responsible for not being able to delete more than one mail msg. This bug still a top usability issue for mail thought. Open a mail msg in standalone. Delete msg. Close standalone window. Nothing in thread pane is selected. Disorienting for user. Not clear to user where they left off reading msgs in thread pane.
Nav triage team: deleting in Bookmarks Manager selects the next bookmarks. Is the problem in comment 35 specific to mail? If so, has this bug morphed and the original problem been fixed? hewitt, could you investigate?
Whiteboard: ue1 → ue1 [need info]
I filed Bug 172392 detailing the specific problems i see in mail. My hunch is that its a different bug causing the mail related problems.
Nav triage team: nsbeta1-
Keywords: nsbeta1nsbeta1-
No longer blocks: 117267
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
Assignee: hewitt → nobody

Closing this as resolved:incomplete given it is an old issue with no activity in the last 19 years. Also, deleting one item from a list now passes over the selection highlight to the next one, so most likely this issue is no longer reproducible.

Status: NEW → RESOLVED
Closed: 23 years ago3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: