Currently, nsEventStateManager::ShiftFocus() offers the focus the document itself before offering it upwards to UI controls. Unlike the browser, we are embedding gecko in a window/dialog that has many controls (not just a single url bar). Now, if the document is at the end of the tabbing order AND has the initial focus, it means that the user must tab through all of the parent window's UI before ever getting to the links within the document. Clearly, in a case where this doesn't involve two keypresses (one tab to url bar, one tab out of url bar) the result is a tedious (7 tabs) user experience while simply attempting to get to that first hyperlink. We would like to see the following - A flag set somewhere during window/document creation that determines whether the document gains focus at the head or tail of the tabbing order. If the default value was the tail, then the browser implementation need not concern itself. Embedding applications would, however, have the option of determining whether users will be forced to traverse all UI before stepping through the document's contents. The document would still get the initial focus regardless.
Assignee: adamlock → saari
CC'ing email@example.com and firstname.lastname@example.org who are both working on similar issues, and one of them should probably own this.
rods, I'm giving this to you since you've got your head wrapped around the issue already.
Assignee: saari → rods
bryner, you are the one who had the the document focus itself and I was just following that convension. I'll take a quicklook and see if I can easily find what needs to be fixed.
Status: NEW → ASSIGNED
Bryner - Have you had a chance to look into this for us? How difficult would it be to allow us the option of placing the document at either the head or the tail of the tabbing focus order?
Based on above comments, and Rod's impending sabbatical, I'm reassigning this to bryner, and targetting 0.9.2. Rod, in the unlikely event you really wanted this, feel free to snatch it back. adding access keyword && cc'ing aaronl too.
Assignee: rods → bryner
Status: ASSIGNED → NEW
Target Milestone: --- → mozilla0.9.2
P2, must-have for embedding.
Priority: -- → P2
With this patch applied, set the pref "focus.docbeforecontent" to true to use the alternate focus traversal suggested in this bug.
We don't (and cannot) use the pref file. Many others have been exposed by nsIWebBrowserSetup to be applied on a per-window basis. Perhaps this is another case?
Created attachment 39899 [details] [diff] [review] patch #2: uses nsIWebBrowserSetup instead of pref
r=adamlock Can you be sure to document what SETUP_FOCUS_DOC_BEFORE_CONTENT does in the interface? Can you also remove the "XXX is this right?" comment if it is right or fix it so that it is?
a=chofmann branch and trunk
checked in on branch and trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Clean up verification of dated code change bus
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.