If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

right-clicking on 1 selected treeitem in a group of selected items causes selection to be lost

RESOLVED FIXED in mozilla0.9

Status

()

Core
XUL
P3
normal
RESOLVED FIXED
17 years ago
9 years ago

People

(Reporter: bz, Assigned: Brian Ryner (not reading))

Tracking

Trunk
mozilla0.9
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

linux trunk build 2000110708.

right-click on a bookmark or on a mail in a folder listing in mailnews.  Watch
it get selected.

Worse, select some mails.  right-click on a mail.  That mail gets selected and
the old selection is lost.
Blocks: 54785

Comment 1

17 years ago
Your first statement is bogus.  If something is not selected, and it is 
right-clicked on, it should become selected prior to the context menu being 
popped up.  

The second statement is a bug though.  A right click should not change the 
selection if the item clicked on is already selected.  
Will keep this report open to track that issue.  Reassigning to bryner.
Assignee: hyatt → bryner

Updated

17 years ago
Summary: right-clicking on tree items selects them → right-clicking on 1 selected treeitem in a group of selected items causes selection to be lost

Comment 2

17 years ago
bug 47917 is currently open for the point of dropping the multiple-selection
on a right-click (although curiously Nav4 on Linux does this annoying thing).

However, that bug is being treated as a mailnews thing, but it is really 
generic to trees (so leaving this as the bug for the base tree binding).
Blocks: 47917
No longer blocks: 54785
(Assignee)

Comment 3

17 years ago
sure, this probably isn't too hard to fix
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
(Assignee)

Comment 4

17 years ago
Created attachment 18978 [details] [diff] [review]
patch
(Assignee)

Comment 5

17 years ago
This should do the trick.  jag, can you review, and hyatt, can you sr?

Comment 6

17 years ago
r=jag

Comment 7

17 years ago
Actually, there is one nuance not handled by this patch, but that can be dealt 
with as a separate enhancement. If the event.target is not a member of the
current selection, then you want to discard the current selection and select
the event.target. Only when the event.target is a member of the current 
selection should that multiple selection be preserved. (At least this is 
how Mac Finder, Windows Explorer, and GNU Midnight Commander behave).

Comment 8

17 years ago
> selectedItem.length == 0

Plural? (or am I not getting something here).

Comment 9

17 years ago
Typo.
(Assignee)

Comment 10

17 years ago
Created attachment 18985 [details] [diff] [review]
patch #2
(Assignee)

Comment 11

17 years ago
fixed the typo by removing that clause entirely -- I don't think it's possible
to get to that point with no items selected.

Also added a clarifying comment.
(Assignee)

Comment 12

17 years ago
Created attachment 18987 [details] [diff] [review]
patch #3

Comment 13

17 years ago
r=jag on the third patch

Comment 14

17 years ago
a=hyatt
(Assignee)

Comment 15

17 years ago
checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Updated

9 years ago
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.