Closed
Bug 64458
Opened 25 years ago
Closed 25 years ago
javascript strict warnings in treeBindings.xml
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
VERIFIED
FIXED
People
(Reporter: bugzilla, Assigned: bugzilla)
Details
Attachments
(1 file)
|
2.92 KB,
patch
|
Details | Diff | Splinter Review |
We should select the first item in a tree if focus is set to it, and there are
no other selected items. We currently do this anyways in most places, so it
might as well be the behavior of the tree.
| Assignee | ||
Comment 1•25 years ago
|
||
Comment 3•25 years ago
|
||
Hmm. The fix seems reasonable code-wise, but I'm not sure it's the right UI.
Two examples:
(1) if a tree doesn't have focus, and the first action to cause focus to occur
is to click on a twisty in the middle of the list, then you wind up having the
folder expand _and_ the first item in the list selected. Looks odd (you can see
this in the Customize Sidebar dialog).
(2) if a tree doesn't have focus, and the first action is to click on the
scrollbar (for a long tree), the list scrolls and the first item is selected
(as it possibly passes out of view). (Try this in 'View Stored Cookies').
Comments?
| Assignee | ||
Comment 4•25 years ago
|
||
Those are both very good points. Adding a check to make sure event.target is
|this| seems to fix both of them. Is that sufficient, or are there other cases
I'm not thinking of? Will that check cause different problems?
| Assignee | ||
Comment 5•25 years ago
|
||
ack, nevermind. That check doesn't fix the scrollbar case. Any ideas on how
to prevent that?
I still maintain that this is the appropriate UI for this, although I
admittedly was doing this only for the case where focus was set manually,
instead of by the user (I can't think of a single case where you'd want to just
focus a tree that didn't have selected items, without selecting an item.
Selection is really the only visible indication of focus in a tree).
If the consensus against this is that it's not a good idea, then that's fine,
but this seems like another case where we'll be doing the same thing
everywhere, which is why I wanted this as base behavior.
Comment 6•25 years ago
|
||
I was just noting two places where auto-selecting was inconsistent with the
user's action (i.e., the UI gesture was not to select something, but it
happened automagically anyways; not a disaster, but not expected).
I'm not sure that you always want to have an item selected whenever a tree gets
initial focus. Sometimes a tree is presented as "the possible choices" and
pre-selecting an item may not be what a UI developer wants. (What do other
toolkits do w.r.t. auto-selection of a tree).
But that's just an opinion, one not fully contemplated, and not one I am really
married to (not even engaged).
(nit: focus is indicated by focus rings in some trees, so selection is not the
only feedback path).
| Assignee | ||
Comment 7•25 years ago
|
||
Yeah, I'm starting to agree that selecting on focus is giving more than was
asked for. How about r='ing the warning fixes and calling it a day?
Comment 8•25 years ago
|
||
Sure, r=jrgm for the warning fixes.
(But I wouldn't drop the auto-select question entirely; maybe it is the way to
go. Perhaps bryner and hyatt have thoughts (or mpt or german from the UE
perspective)).
| Assignee | ||
Comment 9•25 years ago
|
||
Okay thanks, I'll speak with Matthew next time he's around irc.
Hyatt, can you sr just the warning fixes?
Comment 10•25 years ago
|
||
I do not want the tree auto-selecting the first item on focus. Too hairy.
sr=hyatt on just the warning fixes.
| Assignee | ||
Comment 11•25 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Summary: Select first treeitem on focus → JS strict warnings in treeBindings.xml
Comment 13•24 years ago
|
||
sorry for the spam.... just changing the subject so that the bugs can be sorted
correctly
Summary: JS strict warnings in treeBindings.xml → javascript strict warnings in treeBindings.xml
Comment 14•23 years ago
|
||
Comment 0 is bug 154034, "When tabbing to listbox or tree, sometimes nothing
appears focused until you arrow down".
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.
Description
•