Closed Bug 357814 Opened 18 years ago Closed 18 years ago

Scripts are no longer allowed to call window.focus() (except during events when popups would be allowed)

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: robert.stopp, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0 Windows created by "newWin = window.open(url, name, features)" cant get focus from creating window by "newWin.focus()" in Firefox 2.0! Additionaly the flags "dependent" or "modal" are not more working (dont work) like described in http://developer.mozilla.org/en/docs/DOM:window.open! Should that by a new Feature against spam-Windows/ annoying Windows - they mostly work in that way (loading in the background)?! There is not a chance to bring a Properties Dialog, a Filechooser, a Imagegalerie in front to the main window by the main window if they lost the focus. Reproducible: Always Steps to Reproduce: 1. See details above! 2. 3. Actual Results: nothing happens Expected Results: created window get the focus
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Attached file a testcase showing the behaviour (obsolete) (deleted) —
try that with every other browser than FF 2.0! They all do.
Beta-testing for a web-developer would be easier if the Beta takes her own (virgin-like) profile dir and the standard browser (FF 1.5.x) must not be closed. See http://portableapps.com/apps/internet/firefox_portable ! The Web-developer dont asks: work my browser-extensions? - he asks: work my app.
Component: DOM → General
Product: Core → Firefox
Version: 1.8 Branch → 1.0 Branch
Are scripts allowed to raise or lower windows by default? I don't think so.
Component: General → Bookmarks
@martijn look at http://developer.mozilla.org/en/docs/DOM:window.open#Syntax and the security policy for the WindowObjectReference: http://www.mozilla.org/projects/security/components/same-origin.html if there is no blocking - WindowObjectReference should have the same capabilities like the standard window object.
Component: Bookmarks → General
I mean what is set under Tools->Options->Content->Advanced (under enable Javascript).
Assignee: general → nobody
QA Contact: ian → general
@martijn: your are right the main part seems not to be a bug (the only bug then only was to disable the feature in options using same profile from FF 1.5) but the other things the flags "modal" and "dependent" are intended for things like above discribed. They dont raise or lower windows (like the option intends), they keep them in front of the calling window.
Severity: major → minor
Martijn is right, but what is set under "Tools->Options->Content->Advanced->Scripts are allowed to raise or lower windows" is not set in FF 2.0 like in FF 1.5 using the same Profile (Settings are deleted). If this is a bug would somebody else file this? Such things makes it hard to develop a userfriendly Webapplication. Especially on MacOS (new Windows are not shown on something like a Taskbar)
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Version: 1.0 Branch → 2.0 Branch
Can someone please reopen this bug, its closed for no apparant reason and the bug seems to have made it to FF2 final!
Ok, after some testing with disable the Feature for Scripts to raise or lower Windows on FF 1.5 is to say: on FF 1.5 the generated Window looses Focus and can't get Focus from calling Window. BUT: if Flag "dependent" or "modal" is set it stays in Front of the calling Window. This Feature is lost (broken) in FF 2.0! Additionaly the Settings for Scriptactions are not the same in FF 1.5 using the same profile.
Severity: minor → normal
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
*** Bug 358021 has been marked as a duplicate of this bug. ***
The dependent=yes stuff is covered by bug 354123. From the testcase: > setTimeout(function(){win.focus();},100); Web pages are not allowed to screw with focus like this any more by default and I think that's a good thing.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → INVALID
Yeah! Its not a bug its a Feature! setTimeout(function() {readDepreceatedTestcase();},3days);-) I like FF by his options and he says if something should happen but is blocked.
Bug 360312 is similar to this one.
Summary: windows created by "newWin = window.open(url, name, features)" cant get focus from creating window by "newWin.focus()" in Firefox 2.0 → Scripts are no longer allowed to call window.focus() (except during events when popups would be allowed)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: