為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

bug: error message in error console if i reload a page while a javascript alert() box is displayed.

more options

bug: i have an alert("haha"); displayed from an inpage button with javascript, and while the alert message is still open, if i do a refresh i get this error in the error console:

Timestamp: 2/5/2012 12:27:27 μμ Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]

it happens on every site that shows an alert dialogue box

online example: w3schools example

press the "show alert box" button and as the alert box is open do a page refresh.

bug: i have an alert("haha"); displayed from an inpage button with javascript, and while the alert message is still open, if i do a refresh i get this error in the error console: Timestamp: 2/5/2012 12:27:27 μμ Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no] it happens on every site that shows an alert dialogue box online example: [http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert w3schools example] press the "show alert box" button and as the alert box is open do a page refresh.

由 mirrormirror 於 修改

所有回覆 (1)

more options

I didn't realize you could reload in that situation; I thought alert() was application modal. Hmmm...

In Firefox 13 beta 4 on Windows 7 I still see the error:

Timestamp: 5/22/2012 7:41:13 PM
Error: uncaught exception: [Exception... "prompt aborted by user" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: resource:///components/nsPrompter.js :: openTabPrompt :: line 457" data: no]

I don't think it has any negative consequence. Did you just want to get it on someone's list to look at, or is it a problem for your page/application?

I looked in Bugzilla briefly and these sound related:

Bug 655181 – modal dialog (e.g. via window.alert()) opened with meta refresh tag refresh page in background causes this uncaught exception: "prompt aborted by user" .. resource://gre/components/nsPrompter.js

Bug 717248 – Pressing backspace on alert() modal closes alert and triggers "back" functionality without firing onkeydown

Both note the error when navigating the tab in different ways with the alert displayed. But... not much attention to them so far.