Closed Bug 276499 Opened 20 years ago Closed 12 years ago

Javascript Exception on window.focus() and alert()

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: michael.hoskins, Unassigned)

Details

Attachments

(1 file)

When setting the onmouseout event of a link to window.focus(), after popping an
alert from this link, Firefox throws an exception.
Attached file Test case
WFM
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Where do you see the exception?
What version of Firefox are you using?  Ideally you'd append "return false;"
inside the href= attribute.  In any case, javascript console shows nothing.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 
Firefox/1.0

Perhaps it has something to do with the web developer toolbar?  That's the only 
extension I have installed.  I am even able to catch this exception with a try-
catch block.
Confirmed in FF1.0 on WinXP

Exception was:
Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowInternal.focus]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: <unknown filename> ::
onmouseout :: line 0"  data: no]

This does not occur when you have disabled window.focus(), perhaps that is why
others are not seeing it (Tools > Options > Web Features > Javascript > Advanced
> Raise or Lower Windows)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: bross2 → nobody
This bug is part of a query for Firefox bugs that have Status set to NEW, but have version field set to 2.0 or older and have not changed in over 800 days.

http://tiny.cc/forgottennewbugs

If you still see this bug, or if it is still valid with Firefox 3.6.10 or a firefox 4 nightly build, please update the version field and steps to reproduce.
WFM with 21.0a1 (2013-02-19).
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: