Closed Bug 106123 Opened 23 years ago Closed 23 years ago

Ctrl+Tab focuses hidden panes of tabbrowser

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: bryner, Assigned: bryner)

References

Details

(Keywords: access, Whiteboard: [adt2 rtm][verified on trunk])

Attachments

(1 file, 3 obsolete files)

Ctrl+[Shift]+Tab incorrectly focuses the hidden panes when more than one tabbrowser tab is open.
oh, is this what i described on 2001-10-18 17:38 in bug 104977?
feh, you said that already...what i get for not reading *all* the new bugmail in a folder. ;)
*** This bug has been marked as a duplicate of 104602 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
reopening, since i think bryner will be working on this.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
*** Bug 104602 has been marked as a duplicate of this bug. ***
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9.8
-> 1.0
Target Milestone: mozilla0.9.8 → mozilla1.0
*** Bug 126495 has been marked as a duplicate of this bug. ***
Nominating for nsbeta1, we'll first need to fix 124946 though.
Depends on: 124946
Keywords: nsbeta1
nsbeta1+ per Nav triage team, adding access keyword
Keywords: nsbeta1access, nsbeta1+
Please update this bug with an [adt1] - [adt3] impact rating (or take it off the list if it doesn't even rate adt3.) Thanks!
Whiteboard: [adt2]
Attached patch patch (obsolete) — Splinter Review
This patch does the following: - any time we check to see if a docshell is "visible", we also check the "type" attribute of the <browser> that we're in, and make sure it is "content-primary" - factor out the logic for getting at the content for a subshell into a helper method - remove some unused variable assignments
Comment on attachment 77998 [details] [diff] [review] patch This isn't quite right. New patch coming up soon.
Attachment #77998 - Attachment is obsolete: true
Ok, this patch works, but I have a hard time believing there isn't an easier way to do this. What I do here is walk up the document chain; for each document I start at the frame for the content enclosing the subshell we're coming from, walk up until I find a frame with a view, and walk up the view chain, stopping if I find a hidden view. If no hidden views are found, it continues up to the parent document. If we hit the top without finding any hidden views, we go ahead and allow ctrl+tab to focus the document.
I can't believe we need that nastiness. Glad you were the one to write it, not me :) We better put some comments in there, that explain the stages of what's happening. With all of the variables and getters in there, it gets cumbersome to understand. Some good comments at the beginning of each section would help, for example // Get frame and prescontext for docshell, // Check all views in parent chain for visibility, etc. Shouldn't we be leaving this method alone, and fixing nsIBaseWindow::GetVisibility() instead? It seems like the thing should be able to tell us whether it's visible or not, through some interface.
Did you check with dbaron, or hyatt on this? Although I wouldn't say "there *has* to be a better way", I would say "we should make a better way", by adding the necessary methods to interfaces in the right places. I think basic things like, whether an object is visible on screen, should be supported by the object itself.
I don't know much about XUL. In HTML content instead of walking the view tree to see if you an a hidden parent, you could just check the CSS "visibility" style on your frame. A time is coming when all subdocuments will be hooked together with their parent documents into a single giant view tree. (All the work has been done, we're just waiting to post-1.0 to throw the switch.) At that time you'll be able to take a view and follow that view's parents up to the very root of the uber-view-tree, checking visibility as you go, without all the subshelltreeitem etc goop.
Right, I believe the only reason this is necessary is because of the sneaky way that nsDeckFrame hides its non-active panes, that is, by directly manipulating view visibility of a single view rather than by changing CSS style. So, I'm going on the assumption that (for now), this is actually the only way to do what I want to do. New patch coming up (with comments) for review.
Attached patch patch for review (obsolete) — Splinter Review
Ok, here it is. I decided to keep the check for nsIBaseWindow visibility, it seems possible that there are embedding cases where this is our only indicator that the document is hidden (and it's cheap to check).
Attachment #78016 - Attachment is obsolete: true
cc'ing Adam for docshell input -- Adam, what do you think about moving these additional visibility checks into nsDocShell::GetVisibility() ?
Same functionality, but I moved the logic into nsDocShell::GetVisibility.
Attachment #78417 - Attachment is obsolete: true
Comment on attachment 78651 [details] [diff] [review] patch to put the checking in docshell instead r=jkeiser Be aware that JST's iframe change in bug 52334 will change some of the mechanics of this. Or rather, JST should be aware that he will have to change the mechanics of this to fit his change :)
Attachment #78651 - Flags: review+
Comment on attachment 78651 [details] [diff] [review] patch to put the checking in docshell instead sr=hewitt
Attachment #78651 - Flags: superreview+
Keywords: adt1.0.0
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
Pls update the bug, when it has been tested on the trunk.
tested this using commercial trunk builds (2002.04.16) on linux rh7.2, win2k and mac 10.1.3. so far, so good!
per adt we don't want to take this risk for beta, keep baking in the trunk.
Keywords: adt1.0.0adt1.0.0-
Whiteboard: [adt2] → [adt2][verified on trunk]
According to lxr, the checkin for this bug added a printf printf("rootView: dim=(%d,%d)\n", viewBounds.width, viewBounds.height); to nsDocShell::GetVisibility. Was this intentional?
Whiteboard: [adt2][verified on trunk] → [adt2 rtm][verified on trunk]
Good catch. I just removed the printf.
Keywords: adt1.0.0-adt1.0.1
adt1.0.1+ (on behalf ADT's behalf) for checkin to the 1.0 branch, pending Driver's approval. Pls check this in asap.
Blocks: 143047
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1" keyword and add the "fixed1.0.1" keyword.
Attachment #78651 - Flags: approval+
checked in on the 1.0 branch.
*** Bug 143995 has been marked as a duplicate of this bug. ***
tested ctrl+[shift]+tab and [shift]+F6 per the test in bug 104977 comment 4. all looks well using comm branch builds (2002.06.13.0x) on linux rh7.2, mac 10.1.5 and win2k.
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: