Closed
Bug 50223
Opened 25 years ago
Closed 22 years ago
Clicking on Sidebar tab should set focus to sidebar page or widget
Categories
(SeaMonkey :: Sidebar, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: bugzilla, Assigned: neil)
References
Details
(Keywords: helpwanted)
Attachments
(1 file, 1 obsolete file)
710 bytes,
patch
|
p_ch
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
Build ID: 2000082408
When clicking on a tab in the Sidebar, focus should then switch to the sidebar
page, or a (the first?) widget in the panel/page. This is important in a
couple of ways. For example, if you select text in a sidebar panel and then
select text in a website loaded in the adjacent viewport, the selection in the
sidebar panel becomes unfocused (gray) and you then have no way to refocus it
again. Easily futurable, though (unless easy fix -- I imagine it wouldn't be
all that hard, however)
Reporter | ||
Comment 1•25 years ago
|
||
reassigning to matt and wondering why this wasn't done earlier in a mass
change...
Assignee: slamm → matt
Comment 2•25 years ago
|
||
This bug blocks a nsbeta1 blocker, so nominating this bug for nsbeta1.
Keywords: nsbeta1
Updated•25 years ago
|
Target Milestone: --- → mozilla0.9
german, can you comment on this bug.
In my notes you say it's invalid.
Am i correct?
Quick digression: In the longer-term scheme of things I'd want a keyboard
accessible general way (like the tab key) to cycle the main focus a la mail
three pane, url bar -> page content -> sidebar tab (arrow keys to select) ->
sidebar content if tab-able -> url bar...Spec following on that very soon.
So I guess we have to carefully think about how we want to implement this
without screwing in the longer run. So what do you think that for now we set the
focus only when there is a text entry area in that sidebar tab to fix the
problem described here for the short term? Any objections?
PS: Internally at Netscape I have a phonebook tab (XUL) that does display the
proper behavior, it focuses on the first text entry field. However a bugzilla
tab I am also using greys the text field out and the search panel does not grey
it out but also does not focus the query text field. Clearly this should be
cleaned up to have one consistent behavior, but I wonder why this seems tab
dependent?
Comment 6•25 years ago
|
||
> Quick digression: In the longer-term scheme of things I'd want a keyboard
> accessible general way (like the tab key) to cycle the main focus a la mail
> three pane, url bar -> page content -> sidebar tab (arrow keys to select) ->
> sidebar content if tab-able -> url bar...Spec following on that very soon.
In bug 30864, mpt (and several others) suggested ctrl+tab for switching among
frames in the content area, the location bar, and the sidebar.
I'd prefer if Ctrl+Tab took me straight to the content area of the active
sidebar, and there was another key combo to move to another sidebar panel.
> So what do you think that for now we set the focus only when there is a text
> entry area in that sidebar tab to fix the problem described here for the
> short term?
Is that an easy way to do that? Sidebars can be at least xul and html, and the
code can't know which textbox in the panel should be focused. What about long
text that users might want to scroll through?
I'm also worried that sidebars might end up depending on that hack, making it
difficult to remove.
Mass moving most of mozilla0.9 bugs to mozilla0.8.1
Target Milestone: mozilla0.9 → mozilla0.8.1
Jesse your point is valid. The hack might not be worth it, better do it right.
nav triage team:
Marking nsbeta1- but nsCatFood, it's important, but how important?
Comment 10•24 years ago
|
||
kevin: shd this be a nsCatFood+ bug?
Comment 11•24 years ago
|
||
If it allows printing tabs, yes.
Comment 12•24 years ago
|
||
this bug is not related to the ability to print tabs we think. Lets minus it.
Comment 13•24 years ago
|
||
nav triage team:
Moving to mozilla0.9.2 and reassigning to Samir
Assignee: matt → sgehani
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Keywords: nsCatFood → nsCatFood-
Comment 14•24 years ago
|
||
*** Bug 79817 has been marked as a duplicate of this bug. ***
Comment 15•24 years ago
|
||
sidebar+pdt triage: this is deferred till m1.0 at least.
Target Milestone: mozilla0.9.2 → mozilla1.0
Comment 16•24 years ago
|
||
I can think of two possible ways to fix this bug:
1. When the user clicks a sidebar tab, record some state saying "when this
finishes loading, I'm going to focus it". Once the sidebar finishes loading,
look at its DOM tree to determine whether it contains an HTML or XUL textbox.
If it does, focus the first textbox; otherwise, focus the sidebar content area.
2. When the user clicks a sidebar tab, immediately focus the sidebar content
area. Allow the sidebar content to move focus to a textbox using javascript,
just like a search engine's front page would do. (Bug 76621, "sidebar elements
should not grab focus from other parts of window", will allow sidebar panels to
use textbox.focus() without stealing focus when the window is first created.)
I prefer 2, because
- Focus doesn't jump around as much, and ends up in the right place sooner.
- It allows me to use a page like http://www.cs.hmc.edu/~jruderma/js/calc/ as
both normal content and a sidebar panel, using the same mechanism to focus the
textbox as the page loads. (The code to focus the textbox as the page loads is
commented out because of bug 76621.)
- It's possible to introduce security holes by having chrome javascript look
through the DOM tree of content.
Assignee | ||
Comment 20•22 years ago
|
||
Re comment 16: The sidebar doesn't actually prohibit panels from stealing
focus, instead it defines an attribute for the element that the panel would
like to have focus, and it's up to the panel author to use that element instead
of stealing focus. However, switching panels should still default to the
content area, so I'm attaching this patch to address that issue.
Assignee | ||
Updated•22 years ago
|
Attachment #134534 -
Flags: review?(p_ch)
Comment 21•22 years ago
|
||
I'd rather put |this.contentWindow.focus();| in an |else| statement if
|elementToFocus| is not the empty string to avoid focusing twice.
Bonus if you add sth like dump("Element to focus not found!\n") if |element| is
not found (not |debug()| ).
Comment 22•22 years ago
|
||
s/is not the empty string/is the empty string
Assignee | ||
Comment 23•22 years ago
|
||
Attachment #134534 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #134631 -
Flags: review?(p_ch)
Updated•22 years ago
|
Attachment #134631 -
Flags: review?(p_ch) → review+
Assignee | ||
Updated•22 years ago
|
Attachment #134631 -
Flags: superreview?(alecf)
Updated•22 years ago
|
Attachment #134534 -
Flags: review?(p_ch)
Comment 24•22 years ago
|
||
Comment on attachment 134631 [details] [diff] [review]
Addressing review comments
hmmm.. dump huh? I thought we tried not to dump anymore?
sr=alecf without the dump, or with a reasonable explanation.
Attachment #134631 -
Flags: superreview?(alecf) → superreview+
Assignee | ||
Comment 25•22 years ago
|
||
alecf: pch requested the dump in his review comment (don't know why).
Comment 26•22 years ago
|
||
For internal use, I agree that dump should be avoided, but we can have sidebar
by third parties. Dumping an error message can save time if the sidebar creator
mistype the element.
Anyways, that's to your appreciation, my review stand in both cases.
Assignee | ||
Comment 27•22 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•