Closed Bug 279850 Opened 20 years ago Closed 19 years ago

Javascript in Home Location doesn't execute on start-up

Categories

(Firefox :: Settings UI, enhancement)

x86
Windows XP
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 281466

People

(Reporter: ron, Assigned: bugs)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

For example, if the 'home' location (Tools > Options > General > Home Location)
is set to the following Javascript line:

javascript:window.moveTo(0,0);window.resizeTo(990,740);window.location='http://my.yahoo.com';

This Javascript code is designed to set the browser window to fill up the
visible desktop before moving to the my.yahoo.com web page. I find this feature
handy in case I happened to have changed the browser's size before closing it in
my previous session. However, the Javascript does not work on start-up; the
browser opens up to the same size as the previously closed session (it does open
to my.yahoo.com, though). Clicking on the Home button on the toolbar executes
the script correctly, but this should also execute on start-up (IE executes this
correctly on start-up).

Reproducible: Always

Steps to Reproduce:
1. Set your home location (Tools > Options > General > Home Location) to
javascript:window.moveTo(0,0);window.resizeTo(990,740);window.location='http://my.yahoo.com';
2. Resize the browser to fill up half the screen, and possibly move it so that
the left edge is off the desktop.
3. Close your browser.
4. Restart the browser.

Actual Results:  
The browser restarts with the same dimensions as when it was closed. The URL in
the location code is navigated to, however.

Expected Results:  
The javascript should have moved the top-left corner of the browser window to
the top-left corner of the screen (desktop). The browser window should be
resized to the parameters in the resizeTo javascript function. Clicking on the
Home button on the toolbar executes the javascript correctly.
I see it with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

and it is *not* because of the option to allow javascript move or resize
existing windows is disabled. If I enable that, this works from the location
bar, but not when set as home page. Not sure about the reason, though, so
leaving it unco.
OS: Windows 2000 → Windows XP
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Setting the homepage to run a blob of JavaScript is not seen as a desirable
enhancement, because of the abuse it can lead to.  If you want Mozilla to
perform actions on startup create enhancements in bugzilla for each of them, or
search the Firefox extensions for similar functionality.

Alternatively, create a HTML page with the JavaScript, and set that as your
homepage.

*** This bug has been marked as a duplicate of 281466 ***
Severity: minor → enhancement
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs,
filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → preferences
You need to log in before you can comment on or make changes to this bug.