Closed Bug 272455 Opened 20 years ago Closed 19 years ago

javascript statement "prompt(string)" fails with the latest nightly of TB or Fx 1.0.1

Categories

(Core :: DOM: Core & HTML, defect)

1.7 Branch
x86
Windows ME
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: intendentedelleacque, Assigned: mscott)

References

Details

(4 keywords)

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Virgilio3pc)
Build Identifier: 

I'm writing an extension that uses the javascript function "prompt(string)".
It works perfectly in TB 0.9, but with the latest nightly (20041130) the 
execution fails and in the javascript console I find this error:
uncaught exception: [Exception... "Component returned failure code: 0x80004005 
[nsIDOMJSWINDOW.prompt]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)".
With the nightly it happens every time I call "prompt(string)" in a javascript 
script.
If you want to try, the extension is here: http://nic-nac-
project.de/~kaosmos/profilepass-0.1.xpi


Reproducible: Always
Steps to Reproduce:
1. install an extension that has a javascript script with the 
instruction "prompt(string)"
2. launch thunderbird and try to use the extension
3. in tools --> javascript console you'll find the errore above about "prompt"

Actual Results:  
The javascript fails, because of the error with "prompt(string)"

Expected Results:  
The function "prompt(string)" should show a javascript prompt, as happens with 
the 0.9 version

The bug happens with a new installation, without no additional themes and no 
other extensions.
I see this too, and it happens in the latest nightlies as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
A workaround is to invoke the prompt service as in the following code snippet:

http://lxr.mozilla.org/mozilla/source/calendar/resources/content/pref/calendarPref.xul#115
(In reply to comment #2)
> A workaround is to invoke the prompt service as in the following code snippet:
> 
>
http://lxr.mozilla.org/mozilla/source/calendar/resources/content/pref/calendarPref.xul#115
> 

Thank you for the hint, anyway I've just been using that method, but I wanted to
submit the problem because I think that it's a small (?) bug.
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.0.3?
Flags: blocking-aviary1.0.2?
*** Bug 282341 has been marked as a duplicate of this bug. ***
Attachment #177575 - Flags: review?(darin) → review+
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1+
Flags: blocking-aviary1.0.3?
Flags: blocking-aviary1.0.2?
Flags: blocking-aviary1.0.2+
Comment on attachment 177575 [details] [diff] [review]
Fix. Use the window watcher directly to get an nsIAuthPrompt

sr=dveditz,a=dveditz
Attachment #177575 - Flags: superreview?(dveditz)
Attachment #177575 - Flags: superreview+
Attachment #177575 - Flags: approval-aviary1.0.2+
Fixed on the aviary branch.
Doesn't this affect seamonkey 1.7 too?  If so, this needs to land there.
Actually, it changes stuff in gecko so it does need to land there.  Please make
it so.  a=caillon.
Component: General → DOM
Flags: review+
Product: Thunderbird → Core
Version: unspecified → 1.7 Branch
Comment on attachment 177575 [details] [diff] [review]
Fix. Use the window watcher directly to get an nsIAuthPrompt

r=caillon, too.  fwiw.
Attachment #177575 - Flags: review+
Attachment #177575 - Flags: approval1.7.6+
Summary: javascript statement "prompt(string)" fails with the latest nightly of TB → javascript statement "prompt(string)" fails with the latest nightly of TB or Fx 1.0.1
Keywords: fixed1.7.6
Fix landed on the trunk now too. Marking FIXED.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: regression
this has been ported to the AVIARY_1_0_20040515_BRANCH. This does not mean that
it's actually fixed in the 1.0 release of course.
Keywords: fixed-aviary1.0
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: