Open Bug 691129 Opened 14 years ago Updated 3 years ago

page reload triggering events that lead to window.alert() cause "prompt aborted by user" error

Categories

(Core :: General, defect)

6 Branch
x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jules, Unassigned)

Details

Attachments

(1 file)

Attached file test.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Build ID: 20110902133214 Steps to reproduce: Use XMLHttpRequest to request data from a URL that takes a long time to respond; execute window.alert() in response to ready state changing to 4. While the resource is loading, trigger a page reload. See attached test page; /events is a URL on my server that (at least during the behaviour experienced with this test) performs a 10 second wait and then returns "[]". A similar resource will be required for the purposes of testing. Load the page, then press Ctrl+R. Actual results: The syntax error alert box briefly displays, then the console logs the error message: Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 462" data: no] Expected results: The page should have reloaded without displaying the alert or the error message, as the request to reload preceded the events that caused the alert to display.
Not sure whether this really belongs in core or firefox. There may in fact be two separate issues here: 1. Unexpected events firing (the XMLHttpRequest status should not be chaning to 4 in response to a reload request) 2. The alert box being cancelled unexpectedly leading to an error message. Possibly related, although apparently not an identical problem, is bug 655181.
Not sure if this is the same problem you are describing, but I just had a similar issue. It seems if window.alert() is called and the dialog box is left open, then the page is reloaded and a window.alert() call is made in the process, it will fail with this error message.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: