want window.focusWithoutRaise() or similar




12 years ago
23 days ago


(Reporter: dbaron, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Writing this after looking into bug 330006 (again) and bug 361272.)

I think there's a lot of focus code where we either (1) go to significant trouble to avoid calling window.focus() or (2) call window.focus() where we want the focusing effects but not the raising effects.

It would be nice to have a method on the window object that does a focus without doing the raise.  This would be pretty trivial to implement, since there's already a pref check in nsGlobalWindow::Focus that's probably equivalent to what we want for focusing without raising.  The questions are really whether we should have it, what to call it, and what interface it should be on.

I'm not sure if this would be much use to Web pages, although maybe window.focus() has effects of moving focus away from things inside the window that are focused, and Web pages might want those alone?
why wouldn't window.focus() do this?
Why wouldn't it do what?  The point is that there are callers that want part but not all of window.focus().
In Netscape 4, for "Constellation", we talked about such methods as raise, lower and setFocus. I don't see traces of them in http://lxr.mozilla.org/classic/source at this late date, so I bet they never got implemented.

I meant, why would content area script ever be able to raise the window. But I see you're talking about chrome-level APIs. My bad.
Assignee: general → nobody
QA Contact: ian → general

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.